From 58476e18140b1d76674dceacb4102250b2659fd7 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 23 Nov 2014 21:21:44 +0100 Subject: [PATCH] [Debug] fix ENT_SUBSTITUTE usage --- src/Symfony/Component/Debug/ExceptionHandler.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index a0d03236de..74346a5d00 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -384,11 +384,6 @@ EOF; */ private function formatArgs(array $args) { - if (PHP_VERSION_ID >= 50400) { - $flags = ENT_QUOTES | ENT_SUBSTITUTE; - } else { - $flags = ENT_QUOTES; - } $result = array(); foreach ($args as $key => $item) { if ('object' === $item[0]) { @@ -429,7 +424,7 @@ EOF; $str = iconv($charset, 'UTF-8', $str); } - return htmlspecialchars($str, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); + return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8'); } /**