WordPress.org

Ready to get started?Download WordPress

Forums

How to fix the following - "Warning: Invalid argument supplied for foreach" (5 posts)

  1. Affro
    Member
    Posted 2 years ago #

    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

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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.

  3. Affro
    Member
    Posted 2 years ago #

    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?

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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'

  5. Scott Kingsley Clark
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic