Roots Discourse

Warning acf-meta-functions.php line 95

#1

Anyone has ever seen this particular issue?:

Warning : Invalid argument supplied for foreach() in web/app/plugins/advanced-custom-fields-pro/includes/acf-meta-functions.php on line 95

plugins are up to date

0 Likes

#2

This could be due to calling ACF’s get_field(s) function and not passing a valid post_id. For example if you are calling either function outside of the loop, or when the global $post isn’t yet available.

Ref: https://www.advancedcustomfields.com/resources/get_fields/

If you view your PHP stack trace which is output with this warning you should be able to find an exact line this is called at. Working from the bottom to the top, checking the appropriate line numbers in the mentioned files for the call

1 Like

#3

Hey @paulus005 - could be related to this issue: https://github.com/soberwp/controller/issues/114

More specifically see this comment and the next: https://github.com/soberwp/controller/issues/114#issuecomment-469333359

1 Like

#4

Thanks @mmirus ,

The issue was related to this. I fixed it to remove the following rule from my App.php

protected $acf = true;

1 Like

closed #5

This topic was automatically closed after 42 days. New replies are no longer allowed.

0 Likes