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

Error views hot fix #136

Merged
merged 1 commit into from
Oct 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion module/Application/view/error/404.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ if (! empty($this->reason)) :

<?php if (! empty($this->display_exceptions)) : ?>

<?php if (isset($this->exception) && $this->exception instanceof Exception) : ?>
<?php if (isset($this->exception)
&& ($this->exception instanceof \Exception || $this->exception instanceof \Error)) : ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere we check first for Throwable, than Exception, which optimizes for PHP 7 (where both exception and errors are types of Throwable). I'll make that change on merge.

<hr/>
<h2>Additional information:</h2>
<h3><?= get_class($this->exception) ?></h3>
Expand Down
3 changes: 2 additions & 1 deletion module/Application/view/error/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

<?php if (! empty($this->display_exceptions)) : ?>

<?php if (isset($this->exception) && $this->exception instanceof Exception) : ?>
<?php if (isset($this->exception)
&& ($this->exception instanceof \Exception || $this->exception instanceof \Error)) : ?>
<hr/>
<h2>Additional information:</h2>
<h3><?= get_class($this->exception) ?></h3>
Expand Down