Make WordPress Core


Ignore:
Timestamp:
03/27/2014 08:39:08 PM (12 years ago)
Author:
wonderboymusic
Message:

In multi_resize() image editor methods, assert that null can only be passed for one of the arguments, not both. Add a lot more unit test assertions to ensure this.

Props pbearne, DH-Shredder.
Fixes #26823.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor.php

    r26650 r27794  
    8383         * Resizes current image.
    8484         *
    85          * @since 3.5.0
    86          * @access public
    87          * @abstract
    88          *
    89          * @param int $max_w
    90          * @param int $max_h
    91          * @param boolean $crop
     85         * At minimum, either a height or width must be provided.
     86         * If one of the two is set to null, the resize will
     87         * maintain aspect ratio according to the provided dimension.
     88         *
     89         * @since 3.5.0
     90         * @access public
     91         * @abstract
     92         *
     93         * @param  int|null $max_w Image width.
     94         * @param  int|null $max_h Image height.
     95         * @param  boolean  $crop
    9296         * @return boolean|WP_Error
    9397         */
Note: See TracChangeset for help on using the changeset viewer.