Skip to content

Commit 146c403

Browse files
Merge branch '5.4' into 6.4
* 5.4: [VarDumper] Fix test suite with PHP 8.4 [DoctrineBridge] Add missing return type [Mailer] Fix sendmail transport not handling failure [HttpClient] Lazily initialize CurlClientState updating missing translations for Greek #53768 [Validator] Allow BICs’ first four characters to be digits [ErrorHandler] Fix exit code when an exception occurs and the exception handler has been unregistered [Validator] Review Arabic translations and add correct translations.
2 parents c725219 + 5a3c7db commit 146c403

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ErrorHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,10 @@ public static function handleFatalError(?array $error = null): void
595595
set_exception_handler($h);
596596
}
597597
if (!$handler) {
598+
if (null === $error && $exitCode = self::$exitCode) {
599+
register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); });
600+
}
601+
598602
return;
599603
}
600604
if ($handler !== $h) {
@@ -630,8 +634,7 @@ public static function handleFatalError(?array $error = null): void
630634
// Ignore this re-throw
631635
}
632636

633-
if ($exit && self::$exitCode) {
634-
$exitCode = self::$exitCode;
637+
if ($exit && $exitCode = self::$exitCode) {
635638
register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); });
636639
}
637640
}

0 commit comments

Comments
 (0)