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
@acf_is_empty($sub_field['name'])
However, I don’t understand why you’re calling an ACF function when you could simply do
if (empty($sub_field['name']))