WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/04/2014 05:49:26 PM (7 years ago)
Author:
wonderboymusic
Message:

After [28613], also kill queries that explicityly pass empty arrays to category__in, tag__in, tag_slug__in, and author__in to WP_Query.

Adds unit tests.
Fixes #28099.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/results.php

    r28613 r28664  
    514514        $this->assertEqualSets( array( $author_1, $author_2 ), $author_ids );
    515515
     516        $posts = $this->q->query( array( 'author__in' => array() ) );
     517        $this->assertEmpty( $posts );
     518
    516519        $posts = $this->q->query( array(
    517520            'author__not_in' => array( $author_1, $author_2 ),
Note: See TracChangeset for help on using the changeset viewer.