WordPress.org

Ready to get started?Download WordPress

Forums

PHPLeague
Problem with WP 3.5 (12 posts)

  1. gipic
    Member
    Posted 1 year ago #

    Hi, I have an error after the upgrade to new WP release.
    Please help!

    Warning: Missing argument 2 for wpdb::prepare(), called in /web/htdocs/www.scquinto.com/home/cms/wp-content/plugins/phpleague/libs/phpleague-database.php on line 1719 and defined in /web/htdocs/www.scquinto.com/home/cms/wp-includes/wp-db.php on line 990 Warning: Missing argument 2 for wpdb::prepare(), called in /web/htdocs/www.scquinto.com/home/cms/wp-content/plugins/phpleague/libs/phpleague-database.php on line 1719 and defined in /web/htdocs/www.scquinto.com/home/cms/wp-includes/wp-db.php on line 990

    http://wordpress.org/extend/plugins/phpleague/

  2. gipic
    Member
    Posted 1 year ago #

    Issue fixed with a workaround like nextgen gallery issue.

    http://wordpress.org/support/topic/missing-argument-wpdb-in-35-final?replies=46

  3. Lethio
    Member
    Posted 1 year ago #

    Hi gipic. I have the same problem, but I don't know how to fix even after reading the thread about nextgen you posted.

    Can you teach me how to fix the problem?

  4. redwebtoo
    Member
    Posted 1 year ago #

    Using the NextGen thread as a guide, I replaced the line 1719 in
    ../phpleague/libs/phpleague-database.php with

    return $wpdb->get_results($wpdb->prepare($query,null));

    and it seems to have worked (the plugin still works and the error message has stopped)

  5. eberswine
    Member
    Posted 1 year ago #

    SO basically you need to change any "error ** prepare **" like this :

    Copy the same format!

    From
    return $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->player"));

    TO
    return $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->player", null));

  6. rebelpirate
    Member
    Posted 1 year ago #

    I fixed it by changing this code:

    function prepare( $query, $args ) {
    if ( is_null( $query ) )
    return;

    to this code:
    function prepare( $query = null ) { // ( $query, *$args )
    if ( is_null( $query ) )
    return;

    in wp-includes/wp-db.php

  7. mikaweb
    Member
    Plugin Author

    Posted 1 year ago #

    I will have a look soon in order to fix major issues.

    More information here : http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

  8. mikaweb
    Member
    Plugin Author

    Posted 1 year ago #

    I did some quick tests and it seems to be working OK.

    Here is the latest version: https://github.com/Mikaweb/PHPLeague-for-WP

    I'll try to upload it ASAP into WordPress SVN Plugins repository.

  9. rebelpirate
    Member
    Posted 1 year ago #

    i updated 1.4.7 then i get error.

    Warning: Missing argument 2 for PHPLeague_Database::is_fixture_exists(), called in xxxxxxx.com/wp-content/plugins/phpleague/libs/phpleague-front.php on line 257 and defined in /xxxxxxxxxx.com/wp-content/plugins/phpleague/libs/phpleague-database.php on line 479

    then i downgrade the plugin back.

  10. jothikannan
    Member
    Posted 1 year ago #

    Hi ,

    Am also having the same problem ,and down graded the plugin, but it doesn't made any sense

    i got following warning:

    Warning: Missing argument 2 for PHPLeague_Database::is_fixture_exists(), called in /home/demoosiz/public_html/zamalekfans/wp-content/plugins/phpleague/libs/phpleague-front.php on line 257 and defined in /home/demoosiz/public_html/zamalekfans/wp-content/plugins/phpleague/libs/phpleague-database.php on line 479

  11. km
    Member
    Posted 1 year ago #

    Also getting the same error above with 1.4.7 (Missing argument 2 for PHPLeague_Database::is_fixture_exists(). Called on line 257 of phpleague-front and defined in phpleague-database on line 479.

    Are older versions of the plugin working fine? I don't suppose someone can ZIP up their working plugin (older version) and upload it somewhere? I can't find the older version...

  12. burvi2001
    Member
    Posted 10 months ago #

    @rebelpirate,
    Thank you for your fix, it works to me too.

    @mikaweb,
    Any news about scorers, where can I enter this information ?
    Sorry I am a novice, but I don't how to use the player information, what match a player scored a goal (soccer).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags