[wp-trac] [WordPress Trac] #58357: Blank foreach loop detected - Needs reformatting (was: Blank foreach loop detected)
WordPress Trac
noreply at wordpress.org
Fri May 19 14:41:07 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 mayur8991):
I checked from my side. That `$needle` and `$replace` gives the key and
value respectively, for the last item of array.
We can use array_slice() function instead of running that foreach() loop.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58357#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list