Home > WordPress > WordPress: Fix Inove Theme footer for WP 3.5+

WordPress: Fix Inove Theme footer for WP 3.5+

If you see an error at the bottom of your blog pages like:

Warning: Missing argument 2 for wpdb::prepare(), called in /.../wp-content/themes/inove/footer.php on line 22 and defined in /.../wp-includes/wp-db.php on line 990

The problem is that the prepare function was recently changed to require at least two parameters.

As my Inove theme doesn’t seem to be supported, I dove it to fix it myself.

I quickly found a simple fix online. N.B. depending on the application, there may be security ramifications; the changeset linked above mentioned that authors may have been incorrectly using prepare to sanitize queries.

That having been said, to eliminate the error, just change /…/wp-content/themes/inove/footer.php: line 22 from:

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

to:

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

That is, remove the call to prepare.

Hope that helps!

Categories: WordPress Tags:

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip
\n