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

Commit

Permalink
Merge branch 'hotfix/382'
Browse files Browse the repository at this point in the history
Close #382
  • Loading branch information
weierophinney committed Aug 16, 2016
2 parents ed7f0bf + dd2ab60 commit 6fad952
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions module/Application/view/error/404.phtml
@@ -1,29 +1,31 @@
<?php
use Zend\Mvc\Application;
?>
<h1>A 404 error occurred</h1>
<h2><?= $this->message ?></h2>

<?php if (! empty($this->reason)) : ?>
<?php
<?php if (! empty($this->reason)) :
switch ($this->reason) {
case \Zend\Mvc\Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
case Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
$reasonMessage = 'The requested controller was unable to dispatch the request.';
break;
case \Zend\Mvc\Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
$reasonMessage = 'The requested middleware was unable to dispatch the request.';
break;
case \Zend\Mvc\Application::ERROR_CONTROLLER_NOT_FOUND:
case Application::ERROR_CONTROLLER_NOT_FOUND:
$reasonMessage = 'The requested controller could not be mapped to an existing controller class.';
break;
case \Zend\Mvc\Application::ERROR_CONTROLLER_INVALID:
case Application::ERROR_CONTROLLER_INVALID:
$reasonMessage = 'The requested controller was not dispatchable.';
break;
case \Zend\Mvc\Application::ERROR_ROUTER_NO_MATCH:
case Application::ERROR_ROUTER_NO_MATCH:
$reasonMessage = 'The requested URL could not be matched by routing.';
break;
default:
$reasonMessage = 'We cannot determine at this time why a 404 was generated.';
break;
}
?>
?>
<p><?= $reasonMessage ?></p>
<?php endif ?>

Expand Down

0 comments on commit 6fad952

Please sign in to comment.