Fix: Avoid syntax error

This commit is contained in:
Laurent Destailleur 2013-10-18 01:20:25 +02:00
parent 7b53ad5580
commit bf3ca7a0f0

View File

@ -519,7 +519,8 @@ function quotedPrintDecode($str)
* preg_replace /e modifier is deprecated in PHP 5.5 * preg_replace /e modifier is deprecated in PHP 5.5
* but anonymous functions for use in preg_replace_callback are only available from 5.3.0 * but anonymous functions for use in preg_replace_callback are only available from 5.3.0
*/ */
if (version_compare(PHP_VERSION, '5.3.0') >= 0) { /* if (version_compare(PHP_VERSION, '5.3.0') >= 0)
{
$out = preg_replace_callback( $out = preg_replace_callback(
'/=([A-F0-9]{2})/', '/=([A-F0-9]{2})/',
function ($m) { function ($m) {
@ -527,9 +528,11 @@ function quotedPrintDecode($str)
}, },
$out $out
); );
} else {
$out = preg_replace('/=([A-F0-9]{2})/e', chr(hexdec('\\1')), $out);
} }
else
{*/
$out = @preg_replace('/=([A-F0-9]{2})/e', chr(hexdec('\\1')), $out);
// }
return trim($out); return trim($out);
} }