WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks 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:
PR Number:

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)

48340.patch (566 bytes) - added by dkarfa 5 weeks ago.

Download all attachments as: .zip

Change History (2)

@dkarfa
5 weeks ago

#1 @ocean90
5 weeks 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.