diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index 82626a003e..fd4d0a1205 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -241,7 +241,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor { if ( is_resource( $dst ) ) { imagedestroy( $this->image ); $this->image = $dst; - $this->update_size( $dst_w, $dst_h ); + $this->update_size(); return true; } diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index a9982cd08c..179cadabb4 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -317,13 +317,13 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { $dst_h = $src_h; $this->image->scaleImage( $dst_w, $dst_h ); - return $this->update_size( $dst_w, $dst_h ); + return $this->update_size(); } } catch ( Exception $e ) { return new WP_Error( 'image_crop_error', $e->getMessage() ); } - return $this->update_size( $src_w, $src_h ); + return $this->update_size(); } /** diff --git a/wp-includes/class-wp-image-editor.php b/wp-includes/class-wp-image-editor.php index 481b2c18df..099df1e0f3 100644 --- a/wp-includes/class-wp-image-editor.php +++ b/wp-includes/class-wp-image-editor.php @@ -185,8 +185,8 @@ abstract class WP_Image_Editor { */ protected function update_size( $width = null, $height = null ) { $this->size = array( - 'width' => $width, - 'height' => $height + 'width' => (int) $width, + 'height' => (int) $height ); return true; }