WordPress.org

Ready to get started?Download WordPress

Forums

PTA Member Directory and Contact Form
[resolved] Invalid argument warning in pta-display-directory.php (3 posts)

  1. Dion
    Member
    Posted 6 months ago #

    The form appears on the page but I get the following warning above it:

    Warning: Invalid argument supplied for foreach() in /home/egnictun/public_html/wp-content/plugins/pta-member-directory/includes/pta-display-directory.php on line 606

    http://wordpress.org/plugins/pta-member-directory/

  2. DBAR Productions
    Member
    Plugin Author

    Posted 6 months ago #

    You need to define some positions first. That warning is there because it's trying to list members by position, but it didn't find any positions. If Debug is turned off, that message won't be displayed.

    If you are not going to use positions, then on the Member Directory Options page under Contact Form Options the drop down box that says "Contact Form dropdown shows:" should be set to "individuals", and then that section of code for displaying positions will be skipped and you won't get that error message. You'll also want to uncheck the option "show positions after names?" option.

    Either way, that is just a warning message since that variable is empty on that line if you don't define any positions. It won't affect the operation of the plugin. I can add some code in a future release to first check if any positions have been entered or not before it tries to execute that line.

  3. Dion
    Member
    Posted 5 months ago #

    Sorry, I've just seen your reply. I managed to figure that out myself with a little more playing, but thanks anyway!

Reply

You must log in to post.

About this Plugin

About this Topic