Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#48340 closed defect (bug) (invalid)

Core refactor for WP Block Parser

Reported by: dkarfa Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


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)

48340.patch (566 bytes) - added by dkarfa 7 months ago.

Download all attachments as: .zip

Change History (2)

7 months ago

#1 @ocean90
7 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.