mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 15:28:58 +01:00
Fixes #7074: yii\data\ArrayDataProvider did not correctly handle the case Pagination::pageSize = 0
This commit is contained in:
@@ -80,7 +80,10 @@ class ArrayDataProvider extends BaseDataProvider
|
||||
|
||||
if (($pagination = $this->getPagination()) !== false) {
|
||||
$pagination->totalCount = $this->getTotalCount();
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
|
||||
|
||||
if ($pagination->getPageSize() > 0) {
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
|
||||
}
|
||||
}
|
||||
|
||||
return $models;
|
||||
|
||||
Reference in New Issue
Block a user