Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #40397, comment 6


Ignore:
Timestamp:
01/10/2018 04:57:08 PM (7 years ago)
Author:
apearlman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40397, comment 6

    initial v1  
    11@dglingren - did you ever find a solution to this? I'm having a similar issue.
    2 
    3 Replying to [comment:5 dglingren]:
    4 > 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.
    5 >
    6 > 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.
    7 >
    8 > The Codex documentation says "As of PHP 5.4, ..." which indicates that this isn't a holdover from PHP 4.x. I remain confused.
    9 >