WordPress.org

Support

Support » Plugins and Hacks » Football Pool » [Resolved] Warning: Invalid argument supplied for foreach() in

[Resolved] Warning: Invalid argument supplied for foreach() in

  • 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

    http://wordpress.org/extend/plugins/football-pool/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AntoineH

    @antoineh

    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.

    Thanks for the reply
    now it work fine for me!

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Warning: Invalid argument supplied for foreach() in’ is closed to new replies.
Skip to toolbar