Te Taipo - 2013-09-11 04:51:24
Since PHP 5.2 and earlier does not support closures, the hexoctaldecode function will throw a T_FUNCTION error because of the preg_replace_callback, if your version of PHP is below 5.3.
Solution 1;
Find:
function hexoctaldecode( $code ) {
$code = ( substr_count( $code, '\\x' ) > 5 ) ?
urldecode( str_replace( '\\x', '%', $code ) ) : $code;
return preg_replace_callback(
"@\\\(x)?([0-9a-f]{2,3})@",
function( $x ){
return chr( $x[1] ? hexdec( $x[2] ):octdec( $x[2] ) );
},
$code
);
}
and replace with:
function hexoctaldecode( $code ) {
$code = ( substr_count( $code, '\\x' ) > 5 ) ? urldecode( str_replace( '\\x', '%', $code ) ) : $code;
$code = ( substr_count( $code, '\\x' ) > 5 ) ? urldecode( str_replace( '\\x', '%', $code ) ) : $code;
return urldecode( $code );
}
Solution 2: Upgrade to the latest stable release of PHP