Skip to content

ControlStructures::hasBody(): handle no body due to PHP close tag#403

Merged
jrfnl merged 1 commit into
developfrom
feature/controlstructures-hasbody-bugfix-single-line-control-structures
Nov 12, 2022
Merged

ControlStructures::hasBody(): handle no body due to PHP close tag#403
jrfnl merged 1 commit into
developfrom
feature/controlstructures-hasbody-bugfix-single-line-control-structures

Conversation

@jrfnl

@jrfnl jrfnl commented Nov 12, 2022

Copy link
Copy Markdown
Member

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.

1 participant