Roots Discourse

Warning acf-meta-functions.php line 95

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

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.


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

Hey @paulus005 - could be related to this issue:

More specifically see this comment and the next:

1 Like

Thanks @mmirus ,

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

protected $acf = true;


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