From f8b878f8dadc554b70cb60404bda9b980644ad5f Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 4 Jul 2014 01:28:02 +0000 Subject: [PATCH] `WP_Query::parse_tax_query()` has always been documented as `protected`. Plugins should never have used it. However, it did not have a `protected` access modifier, so its visibility was `public` by default. If the access modifier had been present, accessing the method in a plugin would have produced a fatal error. The access modifier was added in [28523], along with magic methods to allow it to be accessed for BC. This one method is problematic because it expects to be passed a reference. The `WP_Query::__call()` logic does not go out of its way to fix this signature discrepancy, and so a warning is thrown: `Parameter 1 to WP_Query::parse_tax_query() expected to be a reference, value given`. Remove the `protected` access modifier from `WP_Query::parse_tax_query()`. Fixes #28739. git-svn-id: https://develop.svn.wordpress.org/trunk@28987 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 7e4ca83c96..7b85e2ed63 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -1822,7 +1822,7 @@ class WP_Query { * * @param array &$q The query variables */ - protected function parse_tax_query( &$q ) { + function parse_tax_query( &$q ) { if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) { $tax_query = $q['tax_query']; } else {