From 39f6e00137eb711c18b324e4c35015990e617b87 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 14 Jul 2013 16:52:54 -0400 Subject: [PATCH] Fixed matching all case. --- framework/yii/i18n/I18N.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/i18n/I18N.php b/framework/yii/i18n/I18N.php index d561963..171b5d4 100644 --- a/framework/yii/i18n/I18N.php +++ b/framework/yii/i18n/I18N.php @@ -113,7 +113,7 @@ class I18N extends Component } else { // try wildcard matching foreach ($this->translations as $pattern => $config) { - if (substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) { + if ($pattern === '*' || substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) { $source = $config; break; }