Browse Source

fixed requirement checker for intl PECL

fixes #1230
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
fbfa18e628
  1. 3
      framework/yii/requirements/YiiRequirementChecker.php
  2. 2
      framework/yii/requirements/requirements.php

3
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);
}

2
framework/yii/requirements/requirements.php

@ -44,7 +44,7 @@ return array(
'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='),
'by' => '<a href="http://www.php.net/manual/en/book.intl.php">Internationalization</a> support',
'memo' => 'PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting
in <code>\Yii::t()</code>, <abbr title="Internationalized domain names">IDN</abbr>-feature of
in <code>Yii::t()</code>, <abbr title="Internationalized domain names">IDN</abbr>-feature of
<code>EmailValidator</code> or <code>UrlValidator</code> or the <code>yii\i18n\Formatter</code> class.'
),
);

Loading…
Cancel
Save