#9867 closed defect (bug) (duplicate)
Fallback function htmlspecialchars_decode fails on Systems prior PHP 5.1.0
| Reported by: | unknown33 | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | General | Version: | 2.7.1 |
| Severity: | normal | Keywords: | compat.php htmlspecialchars_decode |
| Cc: | Focuses: |
Description
The fallback function htmlspecialchars_decode uses wrong variables.
This bug happens in compat.php on systems using PHP prior 5.1.0.
The problem is the check:
if ( !is_scalar( $string ) ) {
trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $string ) . ' given', E_USER_WARNING );
return;
}
this needs to be changed to:
if ( !is_scalar( $str ) ) {
trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $str ) . ' given', E_USER_WARNING );
return;
}
Means the variable $str is not used in the check.
Cheers Dirk
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
See #9090 and #9475