From 4ab8e97f4d96b942a5102eb319caa363fe26cd12 Mon Sep 17 00:00:00 2001 From: Mark Huot Date: Thu, 22 Feb 2024 11:47:55 -0500 Subject: [PATCH] fixing empty previous --- src/http/RequestHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/RequestHandler.php b/src/http/RequestHandler.php index 439b08f..5fbdac1 100644 --- a/src/http/RequestHandler.php +++ b/src/http/RequestHandler.php @@ -55,7 +55,7 @@ protected function handleException(\Throwable $exception, WebRequest $request): { // Twig is _so_ annoying that it wraps actual exceptions. So we need to unpack any // twig exceptions and recursively interact with the actual/previous exception. - if ($exception instanceof RuntimeError) { + if ($exception instanceof RuntimeError && $exception->getPrevious()) { return $this->handleException($exception->getPrevious(), $request); }