From a2c17d92d2c82e9f4bf750a04fcd41ed79d44f7a Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 19 Jan 2016 02:55:27 +0000 Subject: [PATCH] Ignore false values of 'search' in `WP_Comment_Query`. Props danielbachhuber. Fixes #35513. Built from https://develop.svn.wordpress.org/trunk@36345 git-svn-id: http://core.svn.wordpress.org/trunk@36312 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-comment-query.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index 1068050d38..eb6f094a5e 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -745,7 +745,8 @@ class WP_Comment_Query { $this->sql_clauses['where']['user_id'] = $wpdb->prepare( 'user_id = %d', $this->query_vars['user_id'] ); } - if ( '' !== $this->query_vars['search'] ) { + // Falsy search strings are ignored. + if ( strlen( $this->query_vars['search'] ) ) { $search_sql = $this->get_search_sql( $this->query_vars['search'], array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) diff --git a/wp-includes/version.php b/wp-includes/version.php index fb08a34b14..a52a6c6e0a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-1453147032750'; +$wp_version = '4.5-alpha-1453172113095'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.