Home › Forums › Backend Issues (wp-admin) › Getting error in admin: Warning: Invalid argument supplied for foreach() › Reply To: Getting error in admin: Warning: Invalid argument supplied for foreach()
Hi guys,
First off, this is not a breaking issue as you noticed. It’s a php warning so while it’s annoying you can safely use ACF as usual.
You’ve stumbled upon a bug where ACF interprets the tab field as a repeater as well (due to the same naming as an actual repeater). The code then tries to iterate through a repeater value which isn’t there resulting in this warning.
I’ll notify Elliot of this issue so he can patch it for the next update. It’s an easy fix 🙂
In the meantime if this still bugs you you can do what @refused9 suggests and create a new tab field with a slightly different name. After you save the field group I think you can change the name back to be the same as the repeater and it should be fine.. since the slug already exists.
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.