From fbfa18e6281e914ff9d9cbbd0805d6d72ae70ebb Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Tue, 19 Nov 2013 12:28:00 +0100 Subject: [PATCH] fixed requirement checker for intl PECL fixes #1230 --- framework/yii/requirements/YiiRequirementChecker.php | 3 +++ framework/yii/requirements/requirements.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/yii/requirements/YiiRequirementChecker.php b/framework/yii/requirements/YiiRequirementChecker.php index c8ad45d..586cdce 100644 --- a/framework/yii/requirements/YiiRequirementChecker.php +++ b/framework/yii/requirements/YiiRequirementChecker.php @@ -178,6 +178,9 @@ class YiiRequirementChecker if (empty($extensionVersion)) { return false; } + if (strncasecmp($extensionVersion, 'PECL-', 5) == 0) { + $extensionVersion = substr($extensionVersion, 5); + } return version_compare($extensionVersion, $version, $compare); } diff --git a/framework/yii/requirements/requirements.php b/framework/yii/requirements/requirements.php index 34b556e..916d6aa 100644 --- a/framework/yii/requirements/requirements.php +++ b/framework/yii/requirements/requirements.php @@ -44,7 +44,7 @@ return array( 'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='), 'by' => 'Internationalization support', 'memo' => 'PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting - in \Yii::t(), IDN-feature of + in Yii::t(), IDN-feature of EmailValidator or UrlValidator or the yii\i18n\Formatter class.' ), );