Skip to content

Use the passed 'this' ptr instead of ZEND_THIS #8854

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 2 commits into from
Jun 24, 2022

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jun 23, 2022

No description provided.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Is the two values different in this context? If yes, any way this can be tested?

@Girgias
Copy link
Member Author

Girgias commented Jun 23, 2022

Is the two values different in this context? If yes, any way this can be tested?

The two values are not different, as the only call to this static function is in spl_filesystem_file_read_line() which when called always passes ZEND_THIS.

But thanks for prompting as it made me double think why this macro even worked in the first place, and it's because it did a horrendous hack about redefining execute_data :|

@Girgias Girgias merged commit 20638db into php:master Jun 24, 2022
@Girgias Girgias deleted the spl-fileobject-cleanup1 branch June 24, 2022 02:38
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