-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Missing trait causes fatal error unlike a missing interface or parent class #17959
Comments
Compare with the behaviour for a missing class.
produces:
|
Or interface
produces:
|
I would call this a feature rather than a bug. Recovering from inheritance errors can lead to subtle issues. It should almost certainly be fine here since this error occurs before the interface one, but this should still land in master and not in active branches. |
iluuu1994
added a commit
to iluuu1994/php-src
that referenced
this issue
Mar 3, 2025
We were already handling NULL as a case, but seem to have forgotten to pass the ZEND_FETCH_CLASS_EXCEPTION flag. Fixes phpGH-17959
@iluuu1994 thanks! Your fix looks great! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
8.2.0 - 8.2.27, 8.3.0 - 8.3.17, 8.4.1 - 8.4.4
Operating System
No response
The text was updated successfully, but these errors were encountered: