Opened 6 years ago
Closed 6 years ago
#48340 closed defect (bug) (invalid)
Core refactor for WP Block Parser
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
I found the count() inside a loop condition, but WPCS suggest to use that as this way, assign the return value to a variable and use the variable in the loop condition instead.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
WP Block Parser is part of the @wordpress/block-serialization-default-parser package. Please submit any changes at https://github.com/WordPress/gutenberg first. Thank you!
From a quick look, your patch will break the loop since the count will never be 0.