Skip to content
Browse files

Handle MissingViewExceptions better.

When Router::parseExtensions() is enabled for a file extension
that does not map to a view an infinite loop of attempting to render
View/$ext/error500.ctp will be entered. When catching
a MissingViewException check if we were trying to render an
error500. If we were, revert to safe rendering as we might enter a loop.
  • Loading branch information...
markstory committed Dec 28, 2012
1 parent 604898a commit 2ba117eeda6e0ad78916575911748add40a40d5d
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/Cake/Error/ExceptionRenderer.php
@@ -272,10 +272,11 @@ protected function _outputMessage($template) {
} catch (MissingViewException $e) {
try {
} catch (Exception $e) {
$attributes = $e->getAttributes();
if (isset($attributes['file']) && strpos($attributes['file'], 'error500') !== false) {
} else {
} catch (Exception $e) {

0 comments on commit 2ba117e

Please sign in to comment.
You can’t perform that action at this time.