[wp-trac] [WordPress Trac] #40397: PHP 7.1.x problem in WP_Query
WordPress Trac
noreply at wordpress.org
Sun Apr 9 03:04:57 UTC 2017
#40397: PHP 7.1.x problem in WP_Query
--------------------------+------------------------------
Reporter: dglingren | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.7.3
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by SergeyBiryukov):
Reproduced with this snippet:
{{{
class MLAQuery {
function __construct() {
add_filter( 'posts_search',
'MLAQuery::mla_query_posts_search_filter', 10, 2 );
}
public static function mla_query_posts_search_filter(
$search_string, &$query_object ) {
return $search_string;
}
}
new MLAQuery;
}}}
Removing the ampersand from `&$query_object` fixes it, so it appears to be
a plugin issue rather than WordPress core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40397#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list