WordPress.org

Make WordPress Core

Ticket #19525: 19525.diff

File 19525.diff, 493 bytes (added by scribu, 3 years ago)
  • wp-includes/meta.php

    diff --git wp-includes/meta.php wp-includes/meta.php
    index a318bbe..c575d31 100644
    class WP_Meta_Query { 
    748748                                        $meta_value = preg_split( '/[,\s]+/', $meta_value ); 
    749749 
    750750                                if ( empty( $meta_value ) ) { 
     751                                        _doing_it_wrong( 'meta query', sprintf( __( "When operator is set to '%s', the meta value is expected to be an array with at least one element." ), $meta_compare ) ); 
    751752                                        unset( $join[$i] ); 
    752753                                        continue; 
    753754                                }