Conditional required before foreach — ACF compat
-
35 $field_objects = get_field_objects($post_id, false);
36 foreach ($field_objects as $field_object) {
37 $metaBefore[$field_object['key']] = $field_object['value'];
38 }This is causing some warnings like:
PHP Warning: foreach() argument must be of type array|object, bool given in ./wp-content/plugins/nitropack/classes/Integration/Plugin/ACF.php on line 36May as well add a conditional for
is_scalar()oris_array()or something to avoid these?The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Conditional required before foreach — ACF compat’ is closed to new replies.