Merge pull request #17802 from woocommerce/fix/17780

Image resize sizes array exist check
This commit is contained in:
Mike Jolley 2017-11-20 11:32:27 +00:00 committed by GitHub
commit 6e581a313d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class WC_Regenerate_Images {
$size_settings = wc_get_image_size( $size );
if ( isset( $imagemeta['sizes'][ $size ] ) ) {
if ( isset( $imagemeta['sizes'], $imagemeta['sizes'][ $size ] ) ) {
if ( $imagemeta['sizes'][ $size ]['width'] !== $size_settings['width'] || $imagemeta['sizes'][ $size ]['height'] !== $size_settings['height'] ) {
$image = self::resize_and_return_image( $attachment_id, $image, $size, $icon );
}