WordPress.org

Ready to get started?Download WordPress

Forums

iNove
Theme not working properly on WordPress 3.9 anymore (2 posts)

  1. mdempfle
    Member
    Posted 3 months ago #

    Theme is not working properly on WordPress 3.9 anymore.

    Since the last update the following error appears:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/httpd/vhosts/tinywebgallery.com/httpdocs/blog/wp-content/themes/inove/footer.php on line 22 and defined in /home/httpd/vhosts/tinywebgallery.com/httpdocs/blog/wp-includes/wp-db.php on line 1147

    Best, Michael

  2. roadsunknown
    Member
    Posted 1 day ago #

    Update the line 22 in footer.php to:

    $post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970", null));

    Basically, add ,null to send a null parameter as the second argument of the prepare function.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.