diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 3da88679e..04190eba5 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -153,9 +153,20 @@ class ExceptionRenderer { try { $controller = new CakeErrorController($request, $response); $controller->startupProcess(); + $startup = true; } catch (Exception $e) { - if (!empty($controller) && $controller->Components->enabled('RequestHandler')) { + $startup = false; + } + // Retry RequestHandler, as another aspect of startupProcess() + // could have failed. Ignore any exceptions out of startup, as + // there could be userland input data parsers. + if ($startup === false && + !empty($controller) && + $controller->Components->enabled('RequestHandler') + ) { + try { $controller->RequestHandler->startup($controller); + } catch (Exception $e) { } } }