Query: Use `AND` in a SQL query rather than `&&`.

This appears to have been the only instance of `&&` being used in SQL, so for consistency lets remove it.

Props scrappy@hub.org.
Fixes #37903.


git-svn-id: https://develop.svn.wordpress.org/trunk@38491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-09-01 05:10:07 +00:00
parent 2781473733
commit 0b67b63857
1 changed files with 1 additions and 1 deletions

View File

@ -2411,7 +2411,7 @@ class WP_Query {
$cgroupby = "{$this->db->comments}.comment_id";
} else { // Other non singular e.g. front
$cjoin = "JOIN {$this->db->posts} ON ( {$this->db->comments}.comment_post_ID = {$this->db->posts}.ID )";
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
$cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' AND post_type = 'attachment' ) ) AND comment_approved = '1'";
$cgroupby = '';
}