mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Ignore false values of 'search' in WP_Comment_Query.
Props danielbachhuber. Fixes #35513. git-svn-id: https://develop.svn.wordpress.org/trunk@36345 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' )
|
||||
|
||||
Reference in New Issue
Block a user