Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 12, 2022

When a control structure condition is directly followed by a PHP close tag, a semicolon is silently inserted by PHP and the control structure will turn into a control structure without body.

The ControlStructures::hasBody() method previously did not take this into account.

This commit fixes this bug.

Includes additional tests.

When a control structure condition is directly followed by a PHP close tag, a semicolon is silently inserted by PHP and the control structure will turn into a control structure without body.

The `ControlStructures::hasBody()` method previously did not take this into account.

This commit fixes this bug.

Includes additional tests.
@jrfnl jrfnl added this to the 1.0.0-RC1 milestone Nov 12, 2022
@jrfnl jrfnl merged commit ad3207d into develop Nov 12, 2022
@jrfnl jrfnl deleted the feature/controlstructures-hasbody-bugfix-single-line-control-structures branch November 12, 2022 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants