mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@27794 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -82,13 +82,17 @@ abstract class WP_Image_Editor {
|
||||
/**
|
||||
* Resizes current image.
|
||||
*
|
||||
* At minimum, either a height or width must be provided.
|
||||
* If one of the two is set to null, the resize will
|
||||
* maintain aspect ratio according to the provided dimension.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @access public
|
||||
* @abstract
|
||||
*
|
||||
* @param int $max_w
|
||||
* @param int $max_h
|
||||
* @param boolean $crop
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param boolean $crop
|
||||
* @return boolean|WP_Error
|
||||
*/
|
||||
abstract public function resize( $max_w, $max_h, $crop = false );
|
||||
|
||||
Reference in New Issue
Block a user