diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 3da88679e09..0a849020876 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -153,9 +153,14 @@ protected function _getController($exception) { try { $controller = new CakeErrorController($request, $response); $controller->startupProcess(); + $startup = true; } catch (Exception $e) { - if (!empty($controller) && $controller->Components->enabled('RequestHandler')) { + $startup = false; + } + if ($startup === false && !empty($controller) && $controller->Components->enabled('RequestHandler')) { + try { $controller->RequestHandler->startup($controller); + } catch (Exception $e) { } } }