Skip to content

Commit

Permalink
Fix ListViewTest::testRenderSummaryWhenPaginationIsFalseAndSummaryIsNull
Browse files Browse the repository at this point in the history
  • Loading branch information
lav45 committed Nov 17, 2023
1 parent 4a7639a commit fa856d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/data/BaseDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ public function setPagination($value)
}
$value = Yii::createObject(array_merge($config, $value));
}
if ($value instanceof Pagination || $value === false) {
if ($value instanceof Pagination) {
$value->totalCount = $this->getTotalCount();
$this->_pagination = $value;
} elseif ($value === false) {
$this->_pagination = false;

Check warning on line 224 in framework/data/BaseDataProvider.php

View check run for this annotation

Codecov / codecov/patch

framework/data/BaseDataProvider.php#L223-L224

Added lines #L223 - L224 were not covered by tests
} else {
throw new InvalidArgumentException('Only Pagination instance, configuration array or false is allowed.');
}
Expand Down

0 comments on commit fa856d6

Please sign in to comment.