[wp-trac] [WordPress Trac] #58357: Blank foreach loop detected - Needs reformatting
WordPress Trac
noreply at wordpress.org
Tue Jun 6 09:12:27 UTC 2023
#58357: Blank foreach loop detected - Needs reformatting
--------------------------+------------------------------
Reporter: mayur8991 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 6.2.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by Presskopp):
The provided code by @nadimcse won't work in PHP 5.6.20, which is still
marked as compatible with WordPress, see
https://wordpress.org/about/requirements/
But another optimization can be made, by putting the {{{count( $textarr
)}}} out of the for-loop. Patch attached.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58357#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list