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

Commit 105895a

Browse files
committed
Added additional instanceof checks for Error types
Since zend-mvc 3.0 will catch any Throwable when under PHP 7, we need to test for either `Exception` or `Error` in the error handling view scripts.
1 parent e032281 commit 105895a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

module/Application/view/error/404.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ if (isset($this->controller_class)
4848

4949
<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
5050

51-
<?php if(isset($this->exception) && $this->exception instanceof Exception): ?>
51+
<?php if(isset($this->exception) && ($this->exception instanceof Exception || $this->exception instanceof Error)): ?>
5252
<hr/>
5353
<h2>Additional information:</h2>
5454
<h3><?php echo get_class($this->exception); ?></h3>

module/Application/view/error/index.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
55

6-
<?php if(isset($this->exception) && $this->exception instanceof Exception): ?>
6+
<?php if(isset($this->exception) && ($this->exception instanceof Exception || $this->exception instanceof Error)): ?>
77
<hr/>
88
<h2>Additional information:</h2>
99
<h3><?php echo get_class($this->exception); ?></h3>

0 commit comments

Comments
 (0)