[wp-trac] [WordPress Trac] #26823: wp_get_image_editor->multi_resize()

WordPress Trac noreply at wordpress.org
Tue Mar 4 01:02:19 UTC 2014


#26823: wp_get_image_editor->multi_resize()
--------------------------+------------------
 Reporter:  pbearne       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.9
Component:  Media         |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------

Comment (by DH-Shredder):

 Sorry it took me a while to get back to this -- I'd planned on posting
 another patch, but instead I'll give a couple suggestions:
 - On the new test, I'd rather not see us counting on the number of files
 actually generated being correct.  We're on the edge on "unit tests" as
 far as generating files at all, and I'd suggest just checking that the
 array output by `multi_resize()` is empty.  Part of the reason here is
 parallelism of tests, leading to:
 - It's probably better if we avoid writing out files with the same name
 for different tests (GD vs Imagick) -- if they're run in parallel, there
 are going to be conflicts.
 - It seems there are some code standards/comment/formatting changes that
 were lost between the patch I posted and the one you attached.  The most
 important one is required if-statement brackets in the primary (non-test)
 set of changes. If you'd like to handle making things consistent, that's
 fine.  If you'd rather I do, I can port your test additions and post
 another patch.

 On your point regarding changing 0/0 behaviour, I'd think it's proper to
 expect no output if you don't provide a width or height for a resize
 function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26823#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list