mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
* 3.2.x: [ticket/14971] Add on_page test with the string arguments [ticket/14971] Fix pagination PHP warning on PHP 7.1
This commit is contained in:
commit
fb5f33f190
2 changed files with 7 additions and 1 deletions
|
@ -284,7 +284,7 @@ class pagination
|
||||||
*/
|
*/
|
||||||
public function get_on_page($per_page, $start)
|
public function get_on_page($per_page, $start)
|
||||||
{
|
{
|
||||||
return floor($start / $per_page) + 1;
|
return floor((int) $start / (int) $per_page) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -219,6 +219,12 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
|
||||||
0,
|
0,
|
||||||
'PAGE_OF-1-1',
|
'PAGE_OF-1-1',
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'10',
|
||||||
|
'10',
|
||||||
|
'0',
|
||||||
|
'PAGE_OF-1-1',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue