I stumbled upon a bug on row 83 in views_handler_argument_many_to_one.inc where I think that a variable should be sent by reference to work in PHP 4:
views_break_phrase($this->argument, $this);
The function views_break_phrase() doesn't takes $this as a reference and the function that calls views_break_phrase() doesn't take care of the response from the function which should result in that no values are selected when it's run on PHP 4.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 329390-php-4-break-phrase.patch | 4.28 KB | merlinofchaos |
Comments
Comment #1
voxpelli commentedChanged priority to minor - PHP 4 shouldn't be used anymore.
Comment #2
voxpelli commentedThis bug also exists at row 78 in views_handler_argument_numeric.inc
Comment #3
merlinofchaos commentedviews_break_phrase does not need a reference.
Comment #4
voxpelli commentedI can't see how the values assigned to a non-referenced object in PHP 4 and which return value isn't taken care of can be available in the calling function.
Can you describe how that can be possible? In 99% of all cases it works great - but at the two places I have found it shouldn't be working as far as I know.
Comment #5
merlinofchaos commentedIt does seem that the return value needs to be dealt with, but you can't pass the value by reference there.
Comment #6
voxpelli commentedOk, I change the Issue title thenand reactivate this issue - because I agree with you that the return values should be used in views_handler_argument_many_to_one.inc and views_handler_argument_numeric.inc.
It's not me that isn't using the return values - it's views itself that calls views_break_phrase without using it's return values because the $this object is sent as a reference in PHP 5 so the bug would only appear in PHP 4 as I see it.
Comment #7
merlinofchaos commentedAs near as I can tell, every instance of views_break_phrase in use actually has the second argument, so it does not need to be optional. We might want to scan contrib and see if anyone is using it, but let's throw this up for testing:
Comment #8
merlinofchaos commentedCommitted to 6.x branches. No point in committing to 7.x as PHP4 isn't good enough for Drupal 7.