@@ -144,7 +144,6 @@ public function getPreviousExceptionInspector()
144144 return $ this ->previousExceptionInspector ;
145145 }
146146
147-
148147 /**
149148 * Returns an array of all previous exceptions for this inspector's exception
150149 * @return \Throwable[]
@@ -215,13 +214,15 @@ public function getFrames()
215214 // Keep outer frame on top of the inner one
216215 $ outerFrames = $ this ->frames ;
217216 $ newFrames = clone $ previousInspector ->getFrames ();
217+
218218 // I assume it will always be set, but let's be safe
219- if ( 0 < $ newFrames ->count () ) {
220- $ newFrames ->offsetGet ( 0 )->addComment (
219+ if ($ newFrames ->count () > 0 ) {
220+ $ newFrames ->offsetGet (0 )->addComment (
221221 $ previousInspector ->getExceptionMessage (),
222222 'Exception message: '
223223 );
224224 }
225+
225226 $ newFrames ->prependFrames ($ outerFrames ->topDiff ($ newFrames ));
226227 $ this ->frames = $ newFrames ;
227228 }
@@ -272,10 +273,10 @@ protected function getTrace($e)
272273 protected function getFrameFromException ($ exception )
273274 {
274275 return [
275- 'file ' => $ exception ->getFile (),
276- 'line ' => $ exception ->getLine (),
276+ 'file ' => $ exception ->getFile (),
277+ 'line ' => $ exception ->getLine (),
277278 'class ' => get_class ($ exception ),
278- 'args ' => [
279+ 'args ' => [
279280 $ exception ->getMessage (),
280281 ],
281282 ];
@@ -290,10 +291,10 @@ protected function getFrameFromException($exception)
290291 protected function getFrameFromError (ErrorException $ exception )
291292 {
292293 return [
293- 'file ' => $ exception ->getFile (),
294- 'line ' => $ exception ->getLine (),
294+ 'file ' => $ exception ->getFile (),
295+ 'line ' => $ exception ->getLine (),
295296 'class ' => null ,
296- 'args ' => [],
297+ 'args ' => [],
297298 ];
298299 }
299300
0 commit comments