WordPress.org

Support

Support » Plugins and Hacks » How to fix the following – "Warning: Invalid argument supplied for foreach"

How to fix the following – "Warning: Invalid argument supplied for foreach"

  • Hello,
    I’m a first time poster here and a novice wordpress user. I have a profile on my friend’s wordpress blog. I have been getting the following message show up and wondered what it meant and if I should be concerned?

    Warning: Invalid argument supplied for foreach() in /home2/dancing1/public_html/musicaloccupation/wp-content/plugins/pods/functions.php on line 96

    Warning: Invalid argument supplied for foreach() in /home2/dancing1/public_html/musicaloccupation/wp-content/plugins/pods/functions.php on line 96

    Warning: Invalid argument supplied for foreach() in /home2/dancing1/public_html/musicaloccupation/wp-content/plugins/pods/functions.php on line 96

    Warning: Invalid argument supplied for foreach() in /home2/dancing1/public_html/musicaloccupation/wp-content/plugins/pods/functions.php on line 96

Viewing 4 replies - 1 through 4 (of 4 total)
  • the warning usually appears if there is nothing for the function to loop through;

    what is the purpose of that plugin?
    have you set the neccessary data for the plugin?

    to get rid of that error warning, you would need to edit the plugin code and wrap the foreach in a conditional statement to check if there are data.

    Hey thanks for your reply but unfortunately I don’t have the fainest idea of what you mean, I’m a novice! All I know is that I clicked something when I tried to post a new topic and this warning has shown up ever since.

    Can you step me through what I might need to do to check for what you have mentioned: plugin?

    the error warning points to functions.php of a plugin: /plugins/pods/functions.php

    seems to be referring to this plugin: http://wordpress.org/extend/plugins/pods/

    maybe you need to set more data in the plugin options?
    or read the instructions for the plugin?
    or deactivate the plugin, if you are not using it?

    possibly, try to contact the plugin author(s) directly.

    as this problem is caused by a plugin, i am moving this topic to ‘Plugins and Hacks’

    This has been fixed in Pods 1.12 – see http://dev.podscms.org/ to get the latest RC

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to fix the following – "Warning: Invalid argument supplied for foreach"’ is closed to new replies.
Skip to toolbar