8000 [Debug] tweak for #6474 · symfony/symfony@7d67b5b · GitHub
[go: up one dir, main page]

Skip to content < 8000 /span>

Commit 7d67b5b

Browse files
committed
[Debug] tweak for #6474
1 parent 457e6ab commit 7d67b5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Debug/Debug.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public static function enable($errorReportingLevel = null, $displayErrors = true
4646
ErrorHandler::register($errorReportingLevel, $displayErrors);
4747
if ('cli' !== php_sapi_name()) {
4848
ExceptionHandler::register();
49-
} elseif (!ini_get('log_errors') || ini_get('error_log') && $displayErrors) {
49+
// CLI - display errors only if they're not already logged to STDERR
50+
} elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
5051
ini_set('display_errors', 1);
5152
}
5253

0 commit comments

Comments
 (0)
0