Warning: Missing argument 2 for wpdb::prepare()
-
I recently upgraded from 3.4 to 3.6.1 and received this error.
The error can be seen here at the top of every one of my pages.
https://www.RockCastleStorage.comError
Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/08/8767108/html/wp-content/themes/revelation-theme/lib/theme-sidebars.php on line 51 and defined in /home/content/08/8767108/html/wp-includes/wp-db.php on line 992I looked at the files and the theme-sidebars.php on line 51 reads:
$widgetized_pages = $wpdb->get_col( $wpdb->prepare(“SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = ‘celta_sidebar'” ) );The line on 992 in wp-db.php it reads:
function prepare( $query, $args ) {Not sure if this is the info needed to fix, but that is what the error is referring to.
Any help would be awesome.
Thanks,
Dustin
PS. I tried to error out my wp-config.php file to hide the error with “@ini_set(‘display_errors’, 0);”. But had no luck on hiding the error.
- The topic ‘Warning: Missing argument 2 for wpdb::prepare()’ is closed to new replies.