Fix incorrect setup in 'tag' query var test.

The test, introduced in [33724], was intended to demonstrate the behavior of
`example.com?tag=foo` routing. But an error in the test setup meant that a
URL-encoded tag object was being set as the value of 'tag'. Due to a quirk in
the way that `parse_request()` parses query vars, an object value for 'tag'
would inadvertently produce correct results in certain cases. But it's not a
usage we actively support, and it's not what was meant to be tested.

See #33532, #34262.

git-svn-id: https://develop.svn.wordpress.org/trunk@35030 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2015-10-12 15:03:43 +00:00
parent d632e2c4c1
commit e8b0d11989
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class Tests_Query extends WP_UnitTestCase {
wp_set_object_terms( $p3, $t2->slug, 'post_tag' ); wp_set_object_terms( $p3, $t2->slug, 'post_tag' );
$url = add_query_arg( array( $url = add_query_arg( array(
'tag' => $t1, 'tag' => $t1->slug,
), '/' ); ), '/' );
$this->go_to( $url ); $this->go_to( $url );