[wp-trac] [WordPress Trac] #56499: count() used in the loop condition

WordPress Trac noreply at wordpress.org
Fri Sep 2 14:27:55 UTC 2022


#56499: count() used in the loop condition
-------------------------------------+-------------------------------
 Reporter:  krunal265                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Administration           |     Version:  6.0
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  coding-standards
-------------------------------------+-------------------------------
Changes (by johnbillion):

 * keywords:  has-patch => has-patch needs-testing
 * severity:  major => normal


Comment:

 Thanks for the patch @krunal265 . Have you tested this change? The
 `$comments` array gets populated inside the `while` which means this
 change will break this functionality because the count is no longer
 updated with each iteration.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56499#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list