Make WordPress Core

Ticket #55165: 55165.diff

File 55165.diff, 646 bytes (added by maximus80, 3 years ago)
  • src/wp-includes/blocks/site-logo.php

     
    1414 */
    1515function render_block_core_site_logo( $attributes ) {
    1616        $adjust_width_height_filter = function ( $image ) use ( $attributes ) {
    17                 if ( empty( $attributes['width'] ) || empty( $image ) ) {
     17                if ( empty( $attributes['width'] ) || empty( $image ) || ! $image[1] || ! $image[2] ) {
    1818                        return $image;
    1919                }
    2020                $height = (float) $attributes['width'] / ( (float) $image[1] / (float) $image[2] );