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
This commit is contained in:
Boone Gorges 2016-01-19 02:55:27 +00:00
parent 3f643ba9af
commit a2c17d92d2
2 changed files with 3 additions and 2 deletions

View File

@ -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' )

View File

@ -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.