[wp-trac] [WordPress Trac] #23884: Avoid notices when array arguments are missing in WP_Image_Editor::multi_resize()
WordPress Trac
noreply at wordpress.org
Thu Mar 28 23:24:57 UTC 2013
#23884: Avoid notices when array arguments are missing in
WP_Image_Editor::multi_resize()
-----------------------------+--------------------------
Reporter: dh-shredder | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Media
Version: 3.5 | Severity: normal
Keywords: has-patch |
-----------------------------+--------------------------
WP_Image_Editor::multi_resize accepts an array of arrays, where each can
contain:
'height'=>int, 'width'=>int, 'crop'=>bool
At the moment, all of these are required, under penalty of notice.
In other parts of our code, 'crop' is expected to default to false and not
be required.
The attached patch makes 'height' and 'width' required (skipping the
resizes gracefully if they are not provided), and automatically sets crop
to false if it's not provided.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23884>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list