Support

Account

Home Forums Add-ons Repeater Field "Warning: Illegal string offset" after deleting all repeater entries Reply To: "Warning: Illegal string offset" after deleting all repeater entries

  • You need to do a check to make sure that your operation returned a value. For example

    `
    $rows = get_field(‘slides’ );
    if (is_array($rows) && count($rows)) {
    $first_row = $rows[0];
    $first_row_image = $first_row[‘slides_slide-image’ ];
    $image = wp_get_attachment_image_src( $first_row_image, ‘circle’ );
    }