#9867 closed defect (bug) (duplicate)
Fallback function htmlspecialchars_decode fails on Systems prior PHP 5.1.0
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | high | |
| Severity: | normal | Version: | 2.7.1 |
| Component: | General | Keywords: | compat.php htmlspecialchars_decode |
| Focuses: | Cc: |
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
Change History (2)
#1
@
17 years ago
- Milestone Unassigned deleted
- Resolution set to duplicate
- Status changed from new to closed
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
12 years ago
Note: See
TracTickets for help on using
tickets.
See #9090 and #9475