Make WordPress Core

Ticket #18401: 18401.patch

File 18401.patch, 539 bytes (added by Doggie52, 12 years ago)

If array is passed and 'compare' isn't already set to IN, NOT IN, BETWEEN, it will default to IN

  • meta.php

     
    724515                        $meta_value = $q['value'];
    725516
    726517                        if ( in_array( $meta_compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) {
    727                                 if ( ! is_array( $meta_value ) )
     518                                if ( ! is_array( $meta_value ) ) {
    728519                                        $meta_value = preg_split( '/[,\s]+/', $meta_value );
     520                                } else {
     521                                        $meta_compare = 'IN';
     522                                }
    729523
    730524                                if ( empty( $meta_value ) ) {
    731525                                        unset( $join[$i] );