Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#9090 closed defect (bug) (fixed)

validation broken in htmlspecialchars_decode replacement function

Reported by: stringfold Owned by:
Priority: high Milestone: 2.7.2
Component: Validation Version:
Severity: normal Keywords: compatability htmlspecialchars_decode validation PHP4 regression
Cc: Focuses:

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)

#1 @stringfold
18 years ago

  • Keywords compatability htmlspecialchars_decode regression added; compat.php htmlspecialchars_decode. removed

#2 @ryan
18 years ago

[10543] for trunk

#3 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

[10544] for 2.7

#4 @ryan
18 years ago

(In [10543]) Use right variable name. Props stringfold. fixes #9090 for trunk

#5 @ryan
18 years ago

(In [10544]) Use right variable name. Props stringfold. fixes #9090 for 2.7

#6 @ryan
18 years ago

(In [10544]) Use right variable name. Props stringfold. fixes #9090 for 2.7

Note: See TracTickets for help on using tickets.