-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Make $errcontext nullable #912
Comments
Why should we make it nullable? It already has a default value, so it can be used without any issues without passing it through. |
I don't get what's the problem here. Our signature includes the |
|
Yes, but it is optional, so not passing it doesn't create any issue.
It's not used but it's passed through to the next error handler in the stack. We cannot pass an invalid value
|
You are right, maybe the problem I'm facing is not with Whoops. The error is:
So, my stack includes phalcon, whoops, codeception and Sentry. Since this error only occurs in one of the tests suites and codeception does not use type hinting, the error may be there. Nevertheless, it enforces my fifth argument and Sentry should add the proposed change in order to be more resilient, as an error handler should be. |
This is because in the PHP documentation there is no mention that the parameter can be
Indeed, PR is welcome
The fact that Codeception is not using type hinting means nothing in this case. The problem is that the
This has nothing to do with the issue. If a piece of code expects the parameters/variables to be of a certain type and someone else using it passes something else then it's up to him to fix the problem because he's using it wrongly and not whom wrote that code. But as I said before, in this specific case the problem is a non-accurate documentation |
Hi. In addition to #892 can you make the parameter
$errcontext
nullable? I'm having a poor time with Whoops.The text was updated successfully, but these errors were encountered: