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

  1. Dion
    Posted 2 years 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


  2. DBAR Productions
    Plugin Author

    Posted 2 years 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
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic