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’ );
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.