From 105895a6c81b23c1e5094fa98e2d79f852dccfeb Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 9 Jun 2016 13:40:20 -0500 Subject: [PATCH] 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. --- module/Application/view/error/404.phtml | 2 +- module/Application/view/error/index.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Application/view/error/404.phtml b/module/Application/view/error/404.phtml index cc51804996..9bd48ea50f 100644 --- a/module/Application/view/error/404.phtml +++ b/module/Application/view/error/404.phtml @@ -48,7 +48,7 @@ if (isset($this->controller_class) display_exceptions) && $this->display_exceptions): ?> -exception) && $this->exception instanceof Exception): ?> +exception) && ($this->exception instanceof Exception || $this->exception instanceof Error)): ?>

Additional information:

exception); ?>

diff --git a/module/Application/view/error/index.phtml b/module/Application/view/error/index.phtml index 5413a0a75d..0c94356af3 100644 --- a/module/Application/view/error/index.phtml +++ b/module/Application/view/error/index.phtml @@ -3,7 +3,7 @@ display_exceptions) && $this->display_exceptions): ?> -exception) && $this->exception instanceof Exception): ?> +exception) && ($this->exception instanceof Exception || $this->exception instanceof Error)): ?>

Additional information:

exception); ?>