Support

Account

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.