Don't suppress errors in _wp_meta_sql(). See #14572
git-svn-id: http://svn.automattic.com/wordpress/trunk@15568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1652fe96c1
commit
babd60d5d5
|
@ -4234,12 +4234,12 @@ function _wp_meta_sql( $queries, $meta_id_column, $table ) {
|
|||
|
||||
$clauses = array();
|
||||
|
||||
foreach ( $queries as $query ) {
|
||||
$meta_key = trim( @$query['meta_key'] );
|
||||
$meta_value = trim( @$query['meta_value'] );
|
||||
$meta_compare = @$query['meta_compare'];
|
||||
foreach ( $queries as $q ) {
|
||||
$meta_key = isset( $q['meta_key'] ) ? trim( $q['meta_key'] ) : '';
|
||||
$meta_value = isset( $q['meta_value'] ) ? trim( $q['meta_value'] ) : '';
|
||||
$meta_compare = isset( $q['meta_compare'] ) ? $q['meta_compare'] : '=';
|
||||
|
||||
if ( empty( $meta_compare ) || !in_array( $meta_compare, array( '=', '!=', '>', '>=', '<', '<=', 'like' ) ) )
|
||||
if ( !in_array( $meta_compare, array( '=', '!=', '>', '>=', '<', '<=', 'like' ) ) )
|
||||
$meta_compare = '=';
|
||||
|
||||
if ( empty( $meta_key ) )
|
||||
|
|
Loading…
Reference in New Issue