[wp-trac] [WordPress Trac] #40397: PHP 7.1.x problem in WP_Query

WordPress Trac noreply at wordpress.org
Wed Jan 10 16:56:51 UTC 2018


#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 apearlman):

 @dglingren - did you ever find a solution to this? I'm having a similar
 issue.

 Replying to [comment:5 dglingren]:
 > Thanks, @dd32, for your update.  I just ran a quick experiment that
 doesn't agree with your explanation. Using PHP Version 7.0.14 I tried the
 filter with and without the ampersand. In both cases I modified one of the
 elements in the `query_vars` array and added an `error_log()` statement in
 `class-wp-query.php` to see if the modification was reflected in the
 object after the call.
 >
 > With the ampersand added to the filter's second parameter declaration
 the modified array element was present after the filter call; without the
 ampersand the modification was lost.
 >
 > The Codex documentation says "As of PHP 5.4, ..." which indicates that
 this isn't a holdover from PHP 4.x. I remain confused.
 >

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40397#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list