diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index eabd0fd1e5..5fea5f0aa6 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.0 under development ----------------------- +- Bug #5260: `yii\i18n\Formatter::decimalSeparator` and `yii\i18n\Formatter::thousandSeparator` where not configurable when intl is not installed (execut, cebe) - Bug: Date and time formatting now assumes UTC as the timezone for input dates unless a timezone is explicitly given (cebe) - Enh #4275: Added `removeChildren()` to `yii\rbac\ManagerInterface` and implementations (samdark) diff --git a/framework/i18n/Formatter.php b/framework/i18n/Formatter.php index 3837ecc5d5..ea36c0d891 100644 --- a/framework/i18n/Formatter.php +++ b/framework/i18n/Formatter.php @@ -208,8 +208,12 @@ class Formatter extends Component } $this->_intlLoaded = extension_loaded('intl'); if (!$this->_intlLoaded) { - $this->decimalSeparator = '.'; - $this->thousandSeparator = ','; + if ($this->decimalSeparator === null) { + $this->decimalSeparator = '.'; + } + if ($this->thousandSeparator === null) { + $this->thousandSeparator = ','; + } } }