diff --git a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php index f5154c70023..286c2fec351 100644 --- a/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php +++ b/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -36,7 +36,7 @@ class HandleExceptions */ public function bootstrap(Application $app) { - self::$reservedMemory = str_repeat('x', 10240); + self::$reservedMemory = str_repeat('x', 32768); $this->app = $app; @@ -203,6 +203,8 @@ protected function renderHttpResponse(Throwable $e) */ public function handleShutdown() { + self::$reservedMemory = null; + if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) { $this->handleException($this->fatalErrorFromPhpError($error, 0)); } @@ -217,8 +219,6 @@ public function handleShutdown() */ protected function fatalErrorFromPhpError(array $error, $traceOffset = null) { - self::$reservedMemory = null; - return new FatalError($error['message'], 0, $error, $traceOffset); }