Support

Account

Home Forums General Issues Warning: Invalid argument supplied for foreach() in

Solving

Warning: Invalid argument supplied for foreach() in

  • Hello,

    We have a error message appearing on our website, its seem to a conflicting message generated from Visual Composer and ACF. I say this as we turned ACF plugin and the warning message disappeared. Find the warning message below, can anyone offer any advice on how to remove this?

    Were using the latest version of ACF, WordPress and Visual Composer.

    Warning: Invalid argument supplied for foreach() in /var/sites/g/ghe.me/public_html/wp-content/plugins/js_composer/include/classes/vendors/plugins/acf/grid-item-shortcodes.php on line 9

    – See more at: http://ghe.me/fabrication/career-gh/?doing_wp_cron=1428484922.2163178920745849609375#sthash.4vMl2fKe.dpuf

  • This is an issue with Visual Composer. They are failing to do a sanity check to ensure that the array is not returning empty. You’ll notice the error path comes from …plugins/js_composer… not from ACF’s plugin. The reason deactivating it worked is because VC was no longer looking for anything from ACF.

    More to the point, perusing the code it appears you may have a field group defined in ACF that actually has no fields within it. Which would cause that error. However I can’t tell for sure without knowing your setup.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Warning: Invalid argument supplied for foreach() in’ is closed to new replies.