8000 bug #12555 [Debug] fix ENT_SUBSTITUTE usage (nicolas-grekas) · symfony/symfony@7fd45f7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7fd45f7

Browse files
committed
bug #12555 [Debug] fix ENT_SUBSTITUTE usage (nicolas-grekas)
This PR was merged into the 2.6 branch. Discussion ---------- [Debug] fix ENT_SUBSTITUTE usage | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 58476e1 [Debug] fix ENT_SUBSTITUTE usage
2 parents 4838cde + 58476e1 commit 7fd45f7

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