From 3b05e71561afcea47884eeedf843cb9eea0c003f Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Mon, 28 Oct 2013 11:01:38 +0100 Subject: [PATCH] ensure parameter types in baselistview message fixes #1072 --- framework/yii/data/ActiveDataProvider.php | 2 +- framework/yii/widgets/BaseListView.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index e95e4b8..012b7dd 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/framework/yii/data/ActiveDataProvider.php @@ -158,7 +158,7 @@ class ActiveDataProvider extends BaseDataProvider throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.'); } $query = clone $this->query; - return $query->limit(-1)->offset(-1)->count('*', $this->db); + return (int) $query->limit(-1)->offset(-1)->count('*', $this->db); } /** diff --git a/framework/yii/widgets/BaseListView.php b/framework/yii/widgets/BaseListView.php index 27b2eaf..ffbba38 100644 --- a/framework/yii/widgets/BaseListView.php +++ b/framework/yii/widgets/BaseListView.php @@ -139,7 +139,7 @@ abstract class BaseListView extends Widget $pageCount = $pagination->pageCount; if (($summaryContent = $this->summary) === null) { $summaryContent = '
' - . Yii::t('yii', 'Showing {totalCount, plural, =0{0} other{{begin}-{end}}} of {totalCount} {totalCount, plural, one{item} other{items}}.') + . Yii::t('yii', 'Showing {totalCount, plural, =0{0} other{{begin, number, integer}-{end, number, integer}}} of {totalCount, number, integer} {totalCount, plural, one{item} other{items}}.') . '
'; } } else {