Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3477'
Browse files Browse the repository at this point in the history
Close #3477
  • Loading branch information
weierophinney committed Jan 21, 2013
2 parents 91c3b6f + 4eba661 commit 9b7c06c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php
Expand Up @@ -276,6 +276,8 @@ protected function injectException($model, $e)
return;
}

$model->setVariable('display_exceptions', true);

$exception = $e->getParam('exception', false);
if (!$exception instanceof \Exception) {
return;
Expand Down
1 change: 1 addition & 0 deletions tests/ZendTest/Mvc/View/RouteNotFoundStrategyTest.php
Expand Up @@ -223,6 +223,7 @@ public function test404ResponsePrepares404ViewModelWithExceptionWhenAllowed()
$this->assertInstanceOf('Zend\View\Model\ModelInterface', $model);
$variables = $model->getVariables();
if ($allow) {
$this->assertTrue($variables['display_exceptions']);
$this->assertTrue(isset($variables['exception']));
$this->assertSame($exception, $variables['exception']);
} else {
Expand Down

0 comments on commit 9b7c06c

Please sign in to comment.