wpdb::prepare()

Warning: Missing argument 2 for wpdb::prepare() Fixed

When I used a footer that collects the earliest to the newest year to display from the dated posts, I got the “Warning: Missing argument 2 for wpdb::prepare()” on the bottom of the footer. After Googling the problem, I found the fix for it. It’s not a good way to mask the problem like I

Warning: Missing argument 2 for wpdb::prepare()

With all the new database version and WordPress updates, sometimes I get the warning from the footer scripts. This time with the WP 3.6 update. Warning: Missing argument 2 for wpdb::prepare(), called in C:\xampp\htdocs\wp36\wp-content\themes\i2010techs13\footer.php on line 28 and defined in C:\xampp\htdocs\wp36\wp-includes\wp-db.php on line 992 The fix is to add the code to config.php file – anywhere. @ini_set(‘display_errors’, 0);