diff --git a/packages/block-library/src/site-logo/index.php b/packages/block-library/src/site-logo/index.php index 37a8417ea0274c..cff1ff51444e5b 100644 --- a/packages/block-library/src/site-logo/index.php +++ b/packages/block-library/src/site-logo/index.php @@ -14,7 +14,7 @@ */ function render_block_core_site_logo( $attributes ) { $adjust_width_height_filter = function ( $image ) use ( $attributes ) { - if ( empty( $attributes['width'] ) || empty( $image ) ) { + if ( empty( $attributes['width'] ) || empty( $image ) || ! $image[1] || ! $image[2] ) { return $image; } $height = (float) $attributes['width'] / ( (float) $image[1] / (float) $image[2] );