[wp-trac] [WordPress Trac] #52534: PHP 8: wp_localize_script() throws a warning if third parameter is a string.
WordPress Trac
noreply at wordpress.org
Mon Feb 22 12:59:41 UTC 2021
#52534: PHP 8: wp_localize_script() throws a warning if third parameter is a
string.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.7
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: php8 has-patch has-unit-tests dev- | Focuses:
reviewed commit |
-------------------------------------------------+-------------------------
Changes (by jrf):
* keywords: php8 has-patch has-unit-tests => php8 has-patch has-unit-tests
dev-reviewed commit
* milestone: Awaiting Review => 5.7
Comment:
> I think this is safe to go in to 5.7 but as the first RC is only a
couple of days away, could one of you sign off on that.
IMO, between the three of us, we came up with a clean solution to the
issue. The current patch is ready to be committed and doesn't contain any
functional changes, nor BC-breaks and has tests which confirm that.
It does add a `_doing_it_wrong()` notice, but that only shows up when devs
were ''already'' doing it wrong and "doing it wrong" notices only show
when `WP_DEBUG` is turned on, so would not show with the default (end-
user) `WP_DEBUG` settings.
I also think this patch is a candidate for backporting to the 5.6 branch
as it relates to a PHP warning.
@peterwilsoncc Just checking: is there any specific keyword I need to add
for the "second committer sign-off"? I can't seem to find the docs about
it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52534#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list