diff --git a/framework/yii/widgets/BaseListView.php b/framework/yii/widgets/BaseListView.php index d4647ff..8e827d6 100644 --- a/framework/yii/widgets/BaseListView.php +++ b/framework/yii/widgets/BaseListView.php @@ -132,14 +132,14 @@ abstract class BaseListView extends Widget public function renderSummary() { $count = $this->dataProvider->getCount(); - if (($pagination = $this->dataProvider->getPagination()) !== false) { + if (($pagination = $this->dataProvider->getPagination()) !== false && $count > 0) { $totalCount = $this->dataProvider->getTotalCount(); $begin = $pagination->getPage() * $pagination->pageSize + 1; $end = $begin + $count - 1; $page = $pagination->getPage() + 1; $pageCount = $pagination->pageCount; if (($summaryContent = $this->summary) === null) { - $summaryContent = '