Ticket #26823: multi_resize_null_support.2.patch
File multi_resize_null_support.2.patch, 1.6 KB (added by , 11 years ago) |
---|
-
wp-includes/class-wp-image-editor-gd.php
205 205 $orig_size = $this->size; 206 206 207 207 foreach ( $sizes as $size => $size_data ) { 208 if ( ! ( isset( $size_data['width'] ) && isset( $size_data['height'] ) ) )209 continue;210 211 208 if ( ! isset( $size_data['crop'] ) ) 212 209 $size_data['crop'] = false; 213 210 214 $image = $this->_resize( $size_data['width'], $size_data['height'], $size_data['crop'] );211 $image = $this->_resize( absint( $size_data['width'] ), absint( $size_data['height'] ), $size_data['crop'] ); 215 212 216 213 if( ! is_wp_error( $image ) ) { 217 214 $resized = $this->_save( $image ); -
wp-includes/class-wp-image-editor-imagick.php
272 272 if ( ! $this->image ) 273 273 $this->image = $orig_image->getImage(); 274 274 275 if ( ! ( isset( $size_data['width'] ) && isset( $size_data['height'] ) ) )276 continue;277 278 275 if ( ! isset( $size_data['crop'] ) ) 279 276 $size_data['crop'] = false; 280 277 281 $resize_result = $this->resize( $size_data['width'], $size_data['height'], $size_data['crop'] );278 $resize_result = $this->resize( absint( $size_data['width'] ), absint( $size_data['height'] ), $size_data['crop'] ); 282 279 283 280 if( ! is_wp_error( $resize_result ) ) { 284 281 $resized = $this->_save( $this->image );