[wp-trac] [WordPress Trac] #9090: validation broken in
htmlspecialchars_decode replacement function
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 11 18:00:43 GMT 2009
#9090: validation broken in htmlspecialchars_decode replacement function
--------------------------+-------------------------------------------------
Reporter: stringfold | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.7.2
Component: Validation | Version:
Severity: normal | Keywords: compat.php, htmlspecialchars_decode. validation, PHP4
--------------------------+-------------------------------------------------
There is a variable name mismatch in the WordPress version of the function
htmlspecialchars_decode (introduced in PHP5.1). Parameter 1 is $str, but
the validation tests $string, and thus the function will never execute,
because $string is always null and fails the test.
This is a regression because it broke the AZIndex plugin (version 0.7.5)
when the "ignore characters" option was set for an index. It will also
break any code, plugin, or theme that uses this function when running on
PHP < 5.1.
The line in error is line 104 in wp-includes/compat.php:
if ( !is_scalar( $string ) ) {
should be
if ( !is_scalar( $str ) ) {
--
Ticket URL: <https://core.trac.wordpress.org/ticket/9090>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list