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

Conversation

@weierophinney
Copy link
Member

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.

See zendframework/zend-mvc#157 (comment) for an example of why this is needed.

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.
@weierophinney weierophinney added this to the 3.0.0 milestone Jun 9, 2016
@weierophinney weierophinney self-assigned this Jun 9, 2016
<?php if (isset($this->display_exceptions) && $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 Author

Choose a reason for hiding this comment

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

Just a note: we cannot typehint against just Throwable, as the skeleton also supports PHP 5.6. As such, testing for either Exception or Error will satisfy any Throwable type from PHP 7.

@weierophinney weierophinney merged commit 105895a into zendframework:develop Jun 9, 2016
@alextech alextech mentioned this pull request Jun 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant