From 3a86c87c31795a1ce8e50bae92eb3663b3764fc5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 7 Nov 2012 19:28:08 +0000 Subject: [PATCH] Remove single-argument calls to wpdb:prepare(), which are invalid as nothing is being prepared. see #22262. git-svn-id: http://core.svn.wordpress.org/trunk@22428 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 2 +- wp-includes/query.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index d183b622e8..8d645f89ee 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1919,6 +1919,6 @@ function wp_update_network_counts() { $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $wpdb->siteid) ); update_site_option( 'blog_count', $count ); - $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'") ); + $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" ); update_site_option( 'user_count', $count ); } diff --git a/wp-includes/query.php b/wp-includes/query.php index 3a33bf9446..66311fffae 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2406,7 +2406,7 @@ class WP_Query { if ( 'any' == $post_type ) { $in_search_post_types = get_post_types( array('exclude_from_search' => false) ); if ( ! empty( $in_search_post_types ) ) - $where .= $wpdb->prepare(" AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')"); + $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')"; } elseif ( !empty( $post_type ) && is_array( $post_type ) ) { $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')"; } elseif ( ! empty( $post_type ) ) {