Opened 12 years ago
Closed 12 years ago
#23884 closed defect (bug) (fixed)
Avoid notices when array arguments are missing in WP_Image_Editor::multi_resize()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
edit: comment correction