Home Forums ACF PRO Trying to access array offset


Trying to access array offset

  • Hello,

    I get the following error message on the website at the bottom: Notice: Trying to access array offset on value of type bool in /www/htdocs/w01ddc27/optik/ wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php on line 499

    The code shows the following:
    `// parent loop
    if( $new_parent_loop ) {
    $field = get_field_object( $selector, $post_id, false );
    $value = acf_extract_var( $field, ‘value’ );
    $name = $field[‘name’];

    The website uses PHP 7.4. Can someone help me what I can do here so that the error is not displayed?




  • $field = get_field_object( $selector, $post_id, false );

    is returning false. This means that either the field does not exist or you are trying to use an ACF function before ACF has initialized.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.