File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ public function configure(?object $event = null)
82
82
return ;
83
83
}
84
84
$ this ->firstCall = $ this ->hasTerminatedWithException = false ;
85
+ $ hasRun = null ;
85
86
86
87
$ handler = set_exception_handler ('is_int ' );
87
88
$ handler = \is_array ($ handler ) ? $ handler [0 ] : null ;
@@ -144,6 +145,19 @@ public function configure(?object $event = null)
144
145
if ($ this ->exceptionHandler ) {
145
146
if ($ handler instanceof ErrorHandler) {
146
147
$ handler ->setExceptionHandler ($ this ->exceptionHandler );
148
+ if (null !== $ hasRun ) {
149
+ $ throwAt = $ handler ->throwAt (0 ) | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR | \E_USER_ERROR | \E_RECOVERABLE_ERROR | \E_PARSE ;
150
+ $ loggers = [];
151
+
152
+ foreach ($ handler ->setLoggers ([]) as $ type => $ log ) {
153
+ if ($ type & $ throwAt ) {
154
+ $ loggers [$ type ] = [null , $ log [1 ]];
155
+ }
156
+ }
157
+
158
+ // Assume $kernel->terminateWithException() will log uncaught exceptions appropriately
159
+ $ handler ->setLoggers ($ loggers );
160
+ }
147
161
}
148
162
$ this ->exceptionHandler = null ;
149
163
}
You can’t perform that action at this time.
0 commit comments