[wp-trac] [WordPress Trac] #22587: Cast image sizes to array before looping
WordPress Trac
noreply at wordpress.org
Mon Nov 26 02:03:14 UTC 2012
#22587: Cast image sizes to array before looping
------------------------------+------------------------------
Reporter: griffinjt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Warnings/Notices | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------+------------------------------
Comment (by scribu):
Replying to [comment:5 griffinjt]:
> What about those devs that don't know any better? Sure, we can educate
them, but why not give a little protection in the process?
Actually, this "protection" would
a) make devs lazy: ah, I can just pass `__return_false`, even if it should
be an array.
b) make it harder to spot errors; for example, if you forget to return,
you won't get an obvious error that you immediately see and can track
down.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22587#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list