From fa856d62f61fe98c775efc288ef9fafdb91aec16 Mon Sep 17 00:00:00 2001 From: lav45 Date: Fri, 17 Nov 2023 16:38:47 +0300 Subject: [PATCH] Fix ListViewTest::testRenderSummaryWhenPaginationIsFalseAndSummaryIsNull --- framework/data/BaseDataProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/data/BaseDataProvider.php b/framework/data/BaseDataProvider.php index 871f80515a3..b631c0b7973 100644 --- a/framework/data/BaseDataProvider.php +++ b/framework/data/BaseDataProvider.php @@ -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; } else { throw new InvalidArgumentException('Only Pagination instance, configuration array or false is allowed.'); }