#9090 closed defect (bug) (fixed)
validation broken in htmlspecialchars_decode replacement function
Reported by: | stringfold | Owned by: | |
---|---|---|---|
Milestone: | 2.7.2 | Priority: | high |
Severity: | normal | Version: | |
Component: | Validation | Keywords: | compatability htmlspecialchars_decode validation PHP4 regression |
Focuses: | Cc: |
Description
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 ) ) {
Change History (6)
Note: See
TracTickets for help on using
tickets.
[10543] for trunk