How to reproduce the warning
1) Enable error backtrace in the devel module.
2) Create a view and set the pager offset to a value larger than 0
Save and you will see a bunch of warnings.
Reason for the warning
In case that $_GET['page'] is empty only one $pager_page_array element is created:
$pager_page_array = isset($_GET['page']) ? explode(',', $_GET['page']) : array(0);
Solution
Fix the set_current_page function in views_plugin_pager_full.inc:
if(empty($pager_page_array))
$pager_page_array = isset($_GET['page']) ? explode(',', $_GET['page']) : array();
if(!isset($pager_page_array[$this->options['id']]))
$pager_page_array[$this->options['id']] = 0;
Comments
Comment #1
dawehnerDrupal code style set's an { for one-line patches as well
Powered by Dreditor.
Comment #2
jantimon commentedAfter further testing I recognized that the global array is changed somewhere else and somehow one element might be set to -1.
So I changed my patch to reset the $pager_page_array similar to the current implementation.
Comment #3
jantimon commentedThe same bug occurs in the current rc1 version.
\!/ Attached wrong file.
Comment #4
jantimon commentedPatch for RC1
Comment #5
smk-ka commentedSame patch with more comments added.
Comment #6
marcusx commented#5 works fine for me, thanks +1
Comment #7
dawehnerThanks, commited for 7.x-3.x
Does it make sense to try to backport this patch to 6.x-3.x?
Comment #8
drupalexio commentedThis issue is not any longer about 7.x-3.x, but about 6.x-3.x.
Comment #9
esmerel commentedPlease don't change issue components. I'm going to assume nobody cares about 6.x since there's no takers on a backport.