WordPress.org

Make WordPress Core

Changeset 15568


Ignore:
Timestamp:
09/05/10 14:54:55 (4 years ago)
Author:
scribu
Message:

Don't suppress errors in _wp_meta_sql(). See #14572

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15566 r15568  
    42354235    $clauses = array(); 
    42364236 
    4237     foreach ( $queries as $query ) { 
    4238         $meta_key = trim( @$query['meta_key'] ); 
    4239         $meta_value = trim( @$query['meta_value'] ); 
    4240         $meta_compare = @$query['meta_compare']; 
    4241  
    4242         if ( empty( $meta_compare ) || !in_array( $meta_compare, array( '=', '!=', '>', '>=', '<', '<=', 'like' ) ) ) 
     4237    foreach ( $queries as $q ) { 
     4238        $meta_key = isset( $q['meta_key'] ) ? trim( $q['meta_key'] ) : ''; 
     4239        $meta_value = isset( $q['meta_value'] ) ? trim( $q['meta_value'] ) : ''; 
     4240        $meta_compare = isset( $q['meta_compare'] ) ? $q['meta_compare'] : '='; 
     4241 
     4242        if ( !in_array( $meta_compare, array( '=', '!=', '>', '>=', '<', '<=', 'like' ) ) ) 
    42434243            $meta_compare = '='; 
    42444244 
Note: See TracChangeset for help on using the changeset viewer.