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

PHP7 Errors are not properly handled #341

Closed
moay opened this issue Dec 9, 2015 · 3 comments
Closed

PHP7 Errors are not properly handled #341

moay opened this issue Dec 9, 2015 · 3 comments

Comments

@moay
Copy link

moay commented Dec 9, 2015

I just tested out v2 with PHP7, which works really great. There was only one problem: PHP7 doesn't any more handle all Errors as errors, most of the are a new thing between Error and Exception. See: http://php.net/manual/de/language.errors.php7.php

Currently, those new Errors will be handled by Whoops' ExceptionHandler, which expects Exceptions and therefore throws an Error telling me that the Exception is not an Exception.

@mahagr
Copy link
Contributor

mahagr commented Dec 10, 2015

Uncaught TypeError: Argument 1 passed to Whoops\Run::handleException() must be an instance of Exception, instance of Error given in vendor\filp\whoops\src\Whoops\Run.php:234

As Error class extends Throwable (also new in PHP7), type hinting should be removed from the function in order to make it to work.

@staabm
Copy link
Contributor

staabm commented Dec 10, 2015

will be fixed by #284

@denis-sokolov
Copy link
Collaborator

Indeed, we're in the transitional period and we need to release version 2 quickly.
Watch #284 or the releases list.

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

No branches or pull requests

4 participants