[wp-hackers] strange bug / typo in wp source

Peter Westwood peter.westwood at ftwr.co.uk
Wed May 20 21:13:20 GMT 2009


On 20 May 2009, at 21:31, Malaiac wrote:

> /wp-includes/compat.php
> line 102-110
>
> in the svn http://svn.automattic.com/wordpress/trunk/wp-includes/compat.php
> if ( !function_exists( 'htmlspecialchars_decode' ) ) {
> 	// Added in PHP 5.1.0
> 	// Error checks from PEAR::PHP_Compat
> 	function htmlspecialchars_decode( $string, $quote_style =  
> ENT_COMPAT )
> 	{
> 		if ( !is_scalar( $string ) ) {
>
>
> in two recently downloaded files from  http://fr.wordpress.org/
> if ( !function_exists( 'htmlspecialchars_decode' ) ) {
> 	// Added in PHP 5.1.0
> 	// Error checks from PEAR::PHP_Compat
> 	function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT )
> // <<< $str instead of $string
> 	{
> 		if ( !is_scalar( $string ) ) { // obvious error

This is because of #9090, that compat function was not correct in  
2.7.1 but has been fixed in trunk the fr download for 2.7.1 has the  
2.7.1 code in it.

http://svn.automattic.com/wordpress/tags/2.7.1/wp-includes/compat.php
https://core.trac.wordpress.org/ticket/9090

westi
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list