WordPress.org

Support

Support » Plugins and Hacks » Problem with WP 3.5

Problem with WP 3.5

  • 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/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Issue fixed with a workaround like nextgen gallery issue.

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

    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?

    redwebtoo
    Member

    @redwebtoo

    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)

    eberswine
    Member

    @eberswine

    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));

    rebelpirate
    Member

    @rebelpirate

    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

    Plugin Author mikaweb
    Member

    @mikaweb

    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/

    Plugin Author mikaweb
    Member

    @mikaweb

    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.

    rebelpirate
    Member

    @rebelpirate

    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.

    jothikannan
    Member

    @jothikannan

    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

    km
    Member

    @kmaisch

    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…

    burvi2001
    Member

    @burvi2001yahoocom

    @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).

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem with WP 3.5’ is closed to new replies.