WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] upgrade error

[Resolved] upgrade error

  • Hi, I got the following error on my wordpress site after upgrading to 3.6.1:

    Warning: Missing argument 2 for wpdb::prepare(), called in mysite.com/public_html/wp-content/themes/timeline/functions.php on line 203 and defined in mysite.com/public_html/wp-includes/wp-db.php on line 992

    Anyone any idea?

    Help is greatly apreciated!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    I found this snippet in my theme’s functions.php:

    // enable comments on all wordpress posts:
    
    function enable_comments_for_all(){
        global $wpdb;
        $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET comment_status = 'open'")); // Enable comments
        $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET ping_status = 'open'")); // Enable trackbacks
    } enable_comments_for_all();

    I took it out and the error disapeared.
    Any one knows the answer on how to fix the snippet?

    Thanks

    You should query with the theme’s support site, there may be a theme update needed. there is a version 2.2.1 which claims 3.6 compatibility

    http://themeforest.net/item/timeline-ecommerce-wordpress-theme/3366463

    I think this was a function that I put into the functions.php file myself and the link to the theme is another theme than mine, however thanks for the help!

    I’ll mark this topic as resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] upgrade error’ is closed to new replies.
Skip to toolbar