• With DEBUG ON, when viewing pages list I get:

    PHP Notice: Trying to access array offset on value of type bool in /my_wordpress/wp-content/plugins/ocean-extra/ocean-extra.php on line 420

    My correction was to check wp_get_attachment_image_src return by testing $get_image‘s type (=false if wp_get_attachment_image_src failed) :

    $get_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
    if (!is_bool($get_image)) {
        $image = $get_image[0];
        $has_img = true;
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Failure/success check missing’ is closed to new replies.