Skip to content

Commit 7eeeed0

Browse files
authored
Use new error and exception handler getters (#56623)
1 parent 31e1213 commit 7eeeed0

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"symfony/mailer": "^7.2.0",
5353
"symfony/mime": "^7.2.0",
5454
"symfony/polyfill-php83": "^1.31",
55+
"symfony/polyfill-php85": "^1.31",
5556
"symfony/process": "^7.2.0",
5657
"symfony/routing": "^7.2.0",
5758
"symfony/uid": "^7.2.0",

src/Illuminate/Foundation/Bootstrap/HandleExceptions.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -326,27 +326,11 @@ public static function flushState()
326326
*/
327327
public static function flushHandlersState()
328328
{
329-
while (true) {
330-
$previousHandler = set_exception_handler(static fn () => null);
331-
332-
restore_exception_handler();
333-
334-
if ($previousHandler === null) {
335-
break;
336-
}
337-
329+
while (get_exception_handler() !== null) {
338330
restore_exception_handler();
339331
}
340332

341-
while (true) {
342-
$previousHandler = set_error_handler(static fn () => null);
343-
344-
restore_error_handler();
345-
346-
if ($previousHandler === null) {
347-
break;
348-
}
349-
333+
while (get_error_handler() !== null) {
350334
restore_error_handler();
351335
}
352336

src/Illuminate/Http/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"symfony/http-foundation": "^7.2.0",
2727
"symfony/http-kernel": "^7.2.0",
2828
"symfony/polyfill-php83": "^1.31",
29+
"symfony/polyfill-php85": "^1.31",
2930
"symfony/mime": "^7.2.0"
3031
},
3132
"autoload": {

0 commit comments

Comments
 (0)