[wp-trac] [WordPress Trac] #43312: PHP 7.2 warning in wp_kses_attr()
WordPress Trac
noreply at wordpress.org
Sun Mar 18 19:28:13 UTC 2018
#43312: PHP 7.2 warning in wp_kses_attr()
-------------------------------------------------+-------------------------
Reporter: andrei0x309 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.9.5
Component: Formatting | Version:
Severity: normal | Resolution: invalid
Keywords: has-patch has-unit-tests reporter- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Changes (by andrei0x309):
* status: reopened => closed
* resolution: => invalid
Comment:
Sorry guys I did a double check, @ocean90 is right, this warning was
triggered when wp_kses was used with the unsupported false value.
At the time when I had reported the issue I've disabled all plugins, but
now after I took a more deep look I have seen that the problem was because
the theme I have used called wp_kess like this:
{{{#!php
<?php
wp_kses( __('--SOME HTML HERE--', 'theme' ), array( 'strong' => '' ))
}}}
Which should have been:
{{{#!php
<?php
wp_kses( __('--SOME HTML HERE--', 'theme' ), array( 'strong' => array() ))
}}}
I don't know how many developers pass an unsupported value since before
PHP 7.2 it was not an issue.
Thanks, and sorry for the ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43312#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list