Opened 7 years ago
Closed 7 years ago
#48340 closed defect (bug) (invalid)
Core refactor for WP Block Parser
| Reported by: | dkarfa | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.