WordPress.org

Make WordPress Core

Changeset 38491


Ignore:
Timestamp:
09/01/2016 05:10:07 AM (3 years ago)
Author:
dd32
Message:

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@….
Fixes #37903.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r38471 r38491  
    24122412            } else { // Other non singular e.g. front
    24132413                $cjoin = "JOIN {$this->db->posts} ON ( {$this->db->comments}.comment_post_ID = {$this->db->posts}.ID )";
    2414                 $cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
     2414                $cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' AND post_type = 'attachment' ) ) AND comment_approved = '1'";
    24152415                $cgroupby = '';
    24162416            }
Note: See TracChangeset for help on using the changeset viewer.