[wp-trac] [WordPress Trac] #28739: r28523 __call() some functions expecting params by reference
WordPress Trac
noreply at wordpress.org
Fri Jul 4 01:28:03 UTC 2014
#28739: r28523 __call() some functions expecting params by reference
--------------------------+-----------------------------
Reporter: sboisvert | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.0
Component: Query | Version: trunk
Severity: normal | Resolution: fixed
Keywords: | Focuses:
--------------------------+-----------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"28987"]:
{{{
#!CommitTicketReference repository="" revision="28987"
`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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28739#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list