Commit 0818c9bb by Carsten Brandt

do not override config when intl is not installed

fixes #5260
parent a9e91efe
......@@ -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)
......
......@@ -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 = ',';
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment