Support

Account

Home Forums ACF PRO PHP 8 – Trying to access array offset on value of type bool Reply To: PHP 8 – Trying to access array offset on value of type bool

  • You need to test the value before you use it. Fields with no values return null or false depending on the field type.

    
    $section_background_image = get_field('section_background_image');
    if ($section_background_image) {
      // do something with the array
    }