I am getting this error and I do not get the point why this error comes. The error comes from the code below and is located in class-acf-field-flexible-content.php. I added a screenshot of the error to this issue.
// bail ealry if no name (tab) if( acf_is_empty($sub_field['name']) ) continue;
Thanks in advance for thinking along for a solution
You’ve lost me.
You are calling an ACF function that tests if a value is set. This function requires a value to be passed. This issue is that
$sub_field['name'] is undefined were you are referencing it. This is PHP issuing the warning on your call. You can surpress this error by doing
However, I don’t understand why you’re calling an ACF function when you could simply do
I am not using this function.The code that breaks is part of the advanced custom fields plugin. I understand what goes wrong but i do not know how to fix it in my site if it the error is in the plugin. To be honest, I don’t see the added value of the function acf_is_empty.
I am using that version and not seeing this issue. Are you defining any fields in the flex field using php? All fields should have the ‘name’ index event when they don’t have a value, so somewhere along the line it’s either not getting added or getting removed.
You must be logged in to reply to this topic.
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!