mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Remove redundant isset() and empty() checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@13770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2234,7 +2234,7 @@ class WP_Query {
|
||||
if ( ! empty($q['meta_key']) )
|
||||
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s ", $q['meta_key']);
|
||||
if ( ! empty($q['meta_value']) ) {
|
||||
if ( ! isset($q['meta_compare']) || empty($q['meta_compare']) || ! in_array($q['meta_compare'], array('=', '!=', '>', '>=', '<', '<=')) )
|
||||
if ( empty($q['meta_compare']) || ! in_array($q['meta_compare'], array('=', '!=', '>', '>=', '<', '<=')) )
|
||||
$q['meta_compare'] = '=';
|
||||
|
||||
$where .= $wpdb->prepare("AND $wpdb->postmeta.meta_value {$q['meta_compare']} %s ", $q['meta_value']);
|
||||
|
||||
Reference in New Issue
Block a user