Skip to content

Conversation

@nikic
Copy link
Member

@nikic nikic commented Jun 1, 2025

The intent here was to assign the first found line. Instead this always fell back to CG(zend_lineno).

Not sure if this line matters for anything in php-src, but the issue was observed in nikic/php-ast#247.

The intent here was to assign the first found line. Instead this
always fell back to CG(zend_lineno).

Not sure if this line matters for anything in php-src, but the
issue was observed in nikic/php-ast#247.
@nikic nikic requested a review from iluuu1994 June 1, 2025 16:01
@nikic nikic changed the base branch from master to PHP-8.4 June 1, 2025 16:01
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.

This indeed looks like an incorrect adaptation of the zend_ast_create_ functions. Thank you Nikita! Technically we could break once we enter the branch, but it's unlikely to matter in practice as the number of children is very low. Edit: Oh, nevermind. The loop does more than look for the lineno.

@nikic nikic merged commit d66e87b into php:PHP-8.4 Jun 1, 2025
9 checks passed
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