From 41809cfb69dada42da9ef1ab7d80c2318e68ee83 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 8 Dec 2015 14:10:28 +0900 Subject: [PATCH] Fix unsupported /e modifier in preg_replace function call --- config/func.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/func.inc.php b/config/func.inc.php index 06434d2c5..47e6678ce 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -1200,7 +1200,7 @@ function removeSrcHack($match) continue; } - $val = preg_replace('/&#(?:x([a-fA-F0-9]+)|0*(\d+));/e', 'chr("\\1"?0x00\\1:\\2+0)', $m[3][$idx] . $m[4][$idx]); + $val = preg_replace_callback('/&#(?:x([a-fA-F0-9]+)|0*(\d+));/', function($n) {return chr($n[1] ? ('0x00' . $n[1]) : ($n[2] + 0)); }, $m[3][$idx] . $m[4][$idx]); $val = preg_replace('/^\s+|[\t\n\r]+/', '', $val); if(preg_match('/^[a-z]+script:/i', $val))