-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix Exception constructor optimization after https://github.com/php/php-src/pull/18442 #18719
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
Conversation
- Property hooks may now throw exceptions, that seem to be forgotten to be handled - The $previous and $trace properties are private, and they were not accessible from the constructor of a child class
06357db
to
a259d88
Compare
?> | ||
--EXPECTF-- | ||
string(3) "bar" | ||
int(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests may be a little complicated, but I tried to make it visible that properties are now not modified after an exception is thrown (the $code
property remains 1, instead of 2 etc.)
Good find. I don't really like the fact that we need to check for exceptions, I don't think it would be a big deal to not do this. (but probably best to do this anyway for consistency) |
Yes, not a huge issue, but I agree with the consistency stuff. Also, the
|
I'll pull and play with this in a bit |
Yes, feel free to push directly to this branch if something needs to be changed. |
These property writes may now throw exceptions because of property hooks, and this was not handled previously.
* PHP-8.4: Backport relevant changes of #18719
$previous
and$trace
properties are private, and they were not accessible from the constructor of a child class