Skip to content

Fix unevaluated rhs of class constant fetch in constant expression #11047

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

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

iluuu1994
Copy link
Member

Fixes oss-fuzz #57821

op1 and op2 should always be evaluated, even if the class constant fetch itself fails. Otherwise we can get unexpected constant ASTs at runtime (e.g. Foo::class). This wasn't previously an issue because we don't allow (const_expr)::FOO in constant expressions, and op2 was always a string.

/cc @dstogov

@iluuu1994 iluuu1994 merged commit c4a1100 into php:master Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants