Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Sorry can't roll a patch right now.
function views_page() {
$args = func_get_args();
$name = array_shift($args);
$display_id = array_shift($args);
...
Changed to
function views_page($name, $display_id) {
$args = func_get_args();
// Remove $name and $display_id from the arguments.
unset($args[0], $args[1]);
...
$args will now be an array without the first two indexes; array(2 => 'foo', 3 => 'bar') instead of array(0 => 'foo', 1 => 'bar')
Not sure what all consequenses are but date views pager stopped working at least.
Comment | File | Size | Author |
---|---|---|---|
#4 | views-1512590-3.patch | 492 bytes | tim.plunkett |
#3 | views-1512590-3-alternate.patch | 533 bytes | tim.plunkett |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedYou can use array_values() to reset the indexes, but unset() is probably just wrong and array_shift should be used to remove the arguments from the array.
Comment #2
dawehnerJust committed a fix. I don't really get why date module relies on that behavior but hey there should be some problems left :)
Comment #3
tim.plunkettSo that fix is broken (http://qa.drupal.org/pifr/test/27332).
This is why we have a testbot! :)
I'm also not sure why this was broken, I might look into it more, I'd much rather just follow the intention of #1414068: Fix PHP warnings when a View path 404/3's.
Comment #4
tim.plunkettEr, there was also this one.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted #4.