• There seems be a small glitch currently with 3.6 – it did work with 3.5.2.

    “Warning: Missing argument 2 for wpdb::prepare(), called in /home/audiogang/audiogang.dreamhosters.com/wp-content/plugins/buddypress-featured-members/include/bfm-functions.php on line 8 and defined in /home/audiogang/audiogang.dreamhosters.com/wp-includes/wp-db.php on line 992

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/audiogang/audiogang.dreamhosters.com/wp-content/plugins/buddypress-featured-members/include/bfm-functions.php on line 8 and defined in /home/audiogang/audiogang.dreamhosters.com/wp-includes/wp-db.php on line 992″

Viewing 11 replies - 1 through 11 (of 11 total)
  • Yes, my website also problem with below:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/97/11433197/html/wp-content/plugins/category-icons/category_icons.php on line 1047 and defined in /home/content/97/11433197/html/wp-includes/wp-db.php on line 992

    I think it will bug.

    Same here 🙁

    A nice heads up would have been nice …
    Anyhow, for developers this is an interesting read:
    http://make.wordpress.org/core/tag/3-5-field-guide/

    Yes, I also have this problem. I think wordpress 3.6 is still not ready for prime time.

    It’s unfortunately not a WordPress bug … it’s a developers mistake like MCM confirms 🙂
    If you’re not the developer of the plugin or theme causing this error message: contact the developer so he/she can update their code.

    See also: this post, Prepare Missing Argument and the previous link I posted.

    Thank you everyone, I reupload wp3.5.2 “wp-db.php” to server and it well working now.

    wp-includes/wp-db.php in line 992:

    Replace this:

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

    With:

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

    It will fix wordpress 3.6 🙂

    Please do not modify WordPress core files (e.g. wp-includes/wp-db.php) to fix this issue. The wpdb->prepare command has been improved for security purposes. When you modify or overwrite it, you are decreasing the security on your website and breaking the clean upgrade path to later versions of WordPress. Nobody wants that, right?

    Hansaplastique has the correct approach.

    If you read Andrew Nacin’s item on this topic, he tells you exactly what to do. I highly encourage you to read it, whether you are a WordPress user experiencing this issue on your own website or a theme/plugin developer trying to fix this issue in your own product. Nacin’s item speaks to both audiences.

    Open buddypress-featured-members\include\bfm-functions.php

    Change Line 8:
    $result = $wpdb->get_results($wpdb->prepare($query), ARRAY_A);

    to:
    $result = $wpdb->get_results($query, ARRAY_A);

    There is no need for the ‘prepare’ because the query is hard-coded.

    $query = "SELECT * FROM ".$wpdb->base_prefix."usermeta WHERE meta_key = 'bfm_is_featured' AND meta_value = 1";

    Hi shanebp, i made the changes you suggested and it still doesn’t work. Do you have any idea why?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Good but has a bug with 3.6’ is closed to new replies.