[wp-trac] [WordPress Trac] #26823: wp_get_image_editor->multi_resize()
WordPress Trac
noreply at wordpress.org
Tue Jan 14 16:30:06 UTC 2014
#26823: wp_get_image_editor->multi_resize()
--------------------------+------------------------------
Reporter: pbearne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Inline Docs | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by pbearne):
* keywords: needs-patch => has-patch
Comment:
Replying to [comment:13 markoheijnen]:
> We could however add a check to {{{add_image_size()}}}. Not sure what
others think about that.
In add_image_size() NULL or a string its gets mapped to 0 by the ABSINT()
So what check should we add?
This showed me a way to fix the main bug
If we wrap the height and width with ABSINT() we can remove the isset()
test (patch 2) or better we can change the test to check if both height
and width or null or 0 (patch 3)
Which shall we use?
Done a quick bit of testing and both work I feel that patch 3 is better as
it returns earlier if no re-size would happen
Paul
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26823#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list