• I got a lot of these warnings in debug.log

    PHP Warning: Trying to access array offset on value of type bool in \wp-content\plugins\wp-performance-pack\modules\dynamic_images\class.wppp_serve_image.php on line 211

    In line 207 of said page, function image_resize_dimensions can return false instead of array, so an extra check for $new_size is required next line:

    if ( $new_size && ( abs( $new_size[ 4 ] - $this->width ) <= 1 ) && ( abs( $new_size[ 5 ] - $this->height ) <= 1 ) ) {

Viewing 1 replies (of 1 total)
  • Thread Starter alx359

    (@alx359)

    Another small typo in class.wppp_serve_image.php line ~198 forgot to mention before.

    if ( is_wp_error( $image ) ) {
    $this->exit404( 'Error loading image' );
    return false; // fasle -> false
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Trying to access array offset on value of type bool’ is closed to new replies.