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

Commit dd2ab60

Browse files
committed
Merge pull request #382 from webimpress/hotfix/error-views
404 error view - import `Application`
2 parents ed7f0bf + 1a3cca0 commit dd2ab60

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

module/Application/view/error/404.phtml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
<?php
2+
use Zend\Mvc\Application;
3+
?>
14
<h1>A 404 error occurred</h1>
25
<h2><?= $this->message ?></h2>
36

4-
<?php if (! empty($this->reason)) : ?>
5-
<?php
7+
<?php if (! empty($this->reason)) :
68
switch ($this->reason) {
7-
case \Zend\Mvc\Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
9+
case Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
810
$reasonMessage = 'The requested controller was unable to dispatch the request.';
911
break;
10-
case \Zend\Mvc\Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
12+
case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
1113
$reasonMessage = 'The requested middleware was unable to dispatch the request.';
1214
break;
13-
case \Zend\Mvc\Application::ERROR_CONTROLLER_NOT_FOUND:
15+
case Application::ERROR_CONTROLLER_NOT_FOUND:
1416
$reasonMessage = 'The requested controller could not be mapped to an existing controller class.';
1517
break;
16-
case \Zend\Mvc\Application::ERROR_CONTROLLER_INVALID:
18+
case Application::ERROR_CONTROLLER_INVALID:
1719
$reasonMessage = 'The requested controller was not dispatchable.';
1820
break;
19-
case \Zend\Mvc\Application::ERROR_ROUTER_NO_MATCH:
21+
case Application::ERROR_ROUTER_NO_MATCH:
2022
$reasonMessage = 'The requested URL could not be matched by routing.';
2123
break;
2224
default:
2325
$reasonMessage = 'We cannot determine at this time why a 404 was generated.';
2426
break;
2527
}
26-
?>
28+
?>
2729
<p><?= $reasonMessage ?></p>
2830
<?php endif ?>
2931

0 commit comments

Comments
 (0)