Make WordPress Core

Changeset 28987


Ignore:
Timestamp:
07/04/2014 01:28:02 AM (10 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r28887 r28987  
    18231823     * @param array &$q The query variables
    18241824     */
    1825     protected function parse_tax_query( &$q ) {
     1825    function parse_tax_query( &$q ) {
    18261826        if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) {
    18271827            $tax_query = $q['tax_query'];
Note: See TracChangeset for help on using the changeset viewer.