Ready to get started?Download WordPress


Football Pool
[resolved] Warning: Invalid argument supplied for foreach() in (3 posts)

  1. Guzz Windsor
    Posted 1 year ago #

    Good morning,

    I have a big problem with the creation of User defined rankings, after you select the teams and saved it I get this error message:

    Warning: Invalid argument supplied for foreach () in /membri/mysite/wp-content/plugins/football-pool/admin/class-football-pool-admin-rankings.php on line 189
    and after save this
    Warning: Invalid argument supplied for foreach () in/membri/mysite/wp-content/plugins/football-pool/admin/class-football-pool-admin-rankings.php on line 99

    and the page on line I get this message:

    "No users have registered for this pool (yet)."

    Help really do not know what to do!
    Thanks in advance


  2. AntoineH
    Plugin Author

    Posted 1 year ago #

    The first part is a bug: when there are no bonus questions the plugin gives this error. I will fix this in the next version.

    A quick fix for you. Add the following line in file classes\class-football-pool-pool.php just before line 455:

    $question_info = array();

    Your code should now look something like this (lines 452-456):

    $rows = $wpdb->get_results( $sql );
    $this->has_bonus_questions = ( count( $rows ) > 0 );
    $question_info = array();
    foreach ( $rows as $row ) {

    Please let me know if this fixes the problem.

    The message 'No users have registered for this pool (yet)' indicates that there are no blog users that are an active player in the pool. See the 'Players' section on the Help page for more info on this.

  3. Guzz Windsor
    Posted 12 months ago #

    Thanks for the reply
    now it work fine for me!

    Best regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic