Support » Fixing WordPress » upgrade error

  • Resolved Mvd


    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 on line 203 and defined in 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?


    Robin W

    (@robin-w) Moderator

    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

    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 ‘upgrade error’ is closed to new replies.