From e8b0d119890880acdb10810465ee301ef681abb8 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 12 Oct 2015 15:03:43 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/query.php b/tests/phpunit/tests/query.php index ed2b459448..bb29d18d5e 100644 --- a/tests/phpunit/tests/query.php +++ b/tests/phpunit/tests/query.php @@ -251,7 +251,7 @@ class Tests_Query extends WP_UnitTestCase { wp_set_object_terms( $p3, $t2->slug, 'post_tag' ); $url = add_query_arg( array( - 'tag' => $t1, + 'tag' => $t1->slug, ), '/' ); $this->go_to( $url );