diff --git a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php index b631619043fe..f5154c70023d 100644 --- a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php +++ b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -159,9 +159,9 @@ protected function ensureNullLogDriverIsConfigured() */ public function handleException(Throwable $e) { - try { - self::$reservedMemory = null; + self::$reservedMemory = null; + try { $this->getExceptionHandler()->report($e); } catch (Exception $e) { // @@ -217,6 +217,8 @@ public function handleShutdown() */ protected function fatalErrorFromPhpError(array $error, $traceOffset = null) { + self::$reservedMemory = null; + return new FatalError($error['message'], 0, $error, $traceOffset); }