Make WordPress Core

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)

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

Download all attachments as: .zip

Change History (2)

@dkarfa
7 years ago

#1 @ocean90
7 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed

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.