Skip to content

Fix attribute target validation on fake closures #9173

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

Closed
wants to merge 1 commit into from

Conversation

iluuu1994
Copy link
Member

@iluuu1994 iluuu1994 commented Jul 28, 2022

Closes GH-8982

I'll still need to check fake closures of callables created in class scope, which I suspect might fail.

Actually, this should be fine. Closures are the only function that can have a scope but not actually be a method. But closures can never be converted to fake closures since they early-return in that case.

@iluuu1994 iluuu1994 marked this pull request as draft July 28, 2022 09:33
@iluuu1994 iluuu1994 marked this pull request as ready for review July 28, 2022 10:48
@iluuu1994 iluuu1994 requested a review from bwoebi July 28, 2022 14:49
Copy link
Member

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I think (fptr->common.fn_flags & (ZEND_ACC_CLOSURE | ZEND_ACC_FAKE_CLOSURE)) != ZEND_ACC_CLOSURE is more elegant :-D

@iluuu1994 iluuu1994 closed this in 565a416 Jul 29, 2022
@iluuu1994
Copy link
Member Author

Thanks @bwoebi!

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

Successfully merging this pull request may close these issues.

3 participants