Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in logError() when instance of \Error is thrown #12

Conversation

erikverheij
Copy link
Contributor

Since PHP7 internal php errors are thrown as instances of \Error which is not
an instance of \Exception. Both \Error and \Exception are instance of \Throwable.
As \Throwable is not available in PHP<7 there is no way to type hint for both
\Error and \Exception if you want to be compatible with PHP<7.

Since PHP7 internal php errors are thrown as instances of `\Error` which is not
an instance of `\Exception`. Both `\Error` and `\Exception` are instance of `\Throwable`.
As `\Throwable` is not available in PHP<7 there is no way to type hint for both
\Error and \Exception if you want to be compatible with PHP<7.
@mikemadisonweb
Copy link
Owner

That's true, thanks, Erik!

@mikemadisonweb mikemadisonweb merged commit 41ed87c into mikemadisonweb:master Jul 11, 2017
@erikverheij
Copy link
Contributor Author

Thanks! Could you make a new release :)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants