[wp-trac] [WordPress Trac] #55967: Scripts: Ensure path for JavaScript translations is always a string
WordPress Trac
noreply at wordpress.org
Sat Jun 11 16:24:05 UTC 2022
#55967: Scripts: Ensure path for JavaScript translations is always a string
---------------------------+--------------------
Reporter: ocean90 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Script Loader | Version:
Severity: normal | Keywords:
Focuses: |
---------------------------+--------------------
With PHP 8.1 a few `rtrim(): Passing null to parameter #1 ($string) of
type string is deprecated` notices are visible. These have been previously
reported in #55411 and #55119 but a separate ticket for this seems to be
better so it doesn't get lost again.
The notice is triggered by passing `null` as the path value for
`load_script_textdomain()` which passes the value to `untrailingslashit()`
which then calls `rtrim()` on null.
A patch was already submitted by @Chouby in #53635, see
[attachment:53635-09-script-translations.patch:ticket:53635].
Related: #55656
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55967>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list