mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-09 08:47:34 +01:00
Fixed yii\data\ArrayDataProvider::getKeys() return wrong when yii\data\ArrayDataProvider::$allModels contain integer key
This commit is contained in:
@@ -82,7 +82,7 @@ class ArrayDataProvider extends BaseDataProvider
|
||||
$pagination->totalCount = $this->getTotalCount();
|
||||
|
||||
if ($pagination->getPageSize() > 0) {
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user