error in PHP code of the theme builder

We've got a code error showing on all Posts.

Notice: Trying to access array offset on value of type bool in /home/customer/www/springerrescue.org/public_html/wp-content/themes/betheme/functions/theme-functions.php on line 1536

Example page:  https://www.springerrescue.org/billy-bonnie-special-needs/ 

Our web guy says:

the section of code with the error is as follows:

        if (mfn_opts_get('mfn-seo-schema-type')) {

          $link_before .= '<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';


             $image_url = wp_get_attachment_image_src(get_post_thumbnail_id($postID), 'full');


            $link_after_schema = '<meta itemprop="url" content="'. esc_url($image_url[0]) .'"/>';

            $link_after_schema .= '<meta itemprop="width" content="'. esc_attr(mfn_get_attachment_data($image_url[0], 'width')) .'"/>';

            $link_after_schema .= '<meta itemprop="height" content="'. esc_attr(mfn_get_attachment_data($image_url[0], 'height')) .'"/>';


          $link_after_schema .= '</div>';


          $link_after = $link_after_schema . $link_after;

        }

      }

Comments

Sign In or Register to comment.