Closed ocean90 closed 6 years ago
Using PHP 7.1.9 I'm seeing the PHP warning for Parameter 2 to SolrPower_WP_Query::the_posts() expected to be a reference, value given
Parameter 2 to SolrPower_WP_Query::the_posts() expected to be a reference, value given
https://github.com/pantheon-systems/solr-power/blob/ae06bbb087c938e9f670e69f1abe1f3ece4a2125/includes/class-solrpower-wp-query.php#L374-L382
The stack:
apply_filters_ref_array('the_posts') wp-includes/class-wp-query.php:3007 WP_Query->get_posts() wp-includes/class-wp-query.php:3248 WP_Query->query() wp-includes/class-wp.php:617 WP->query_posts() wp-includes/class-wp.php:735 WP->main() wp-includes/functions.php:955 wp() wp-blog-header.php:16
Since objects are always passed by reference the need for the & isn't required. Removing it removes also the warning.
&
This issue still happens when using php 7.2, let me know if there's anything else I can provide to help, but the OP covers what I'm seeing.
Using PHP 7.1.9 I'm seeing the PHP warning for
Parameter 2 to SolrPower_WP_Query::the_posts() expected to be a reference, value given
https://github.com/pantheon-systems/solr-power/blob/ae06bbb087c938e9f670e69f1abe1f3ece4a2125/includes/class-solrpower-wp-query.php#L374-L382
The stack:
Since objects are always passed by reference the need for the
&
isn't required. Removing it removes also the warning.