8000 [Debug] fix ENT_SUBSTITUTE usage · symfony/symfony@58476e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58476e1

Browse files
[Debug] fix ENT_SUBSTITUTE usage
1 parent 31792b0 commit 58476e1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,6 @@ private function formatPath($path, $line)
384384
*/
385385
private function formatArgs(array $args)
386386
{
387-
if (PHP_VERSION_ID >= 50400) {
388-
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
389-
} else {
390-
$flags = ENT_QUOTES;
391-
}
392387
$result = array();
393388
foreach ($args as $key => $item) {
394389
if ('object' === $item[0]) {
@@ -429,7 +424,7 @@ protected static function utf8Htmlize($str)
429424
$str = iconv($charset, 'UTF-8', $str);
430425
}
431426

432-
return htmlspecialchars($str, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
427+
return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8');
433428
}
434429

435430
/**

0 commit comments

Comments
 (0)
0