[BUGFIX] config.locale_all should format floating point values 57/47457/3
authorBenni Mack <benni@typo3.org>
Thu, 31 Mar 2016 11:20:32 +0000 (13:20 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 31 Mar 2016 11:26:42 +0000 (13:26 +0200)
The bug with LC_NUMERIC existed in PHP 4.2.3 but is fixed since at least
PHP 5.1.6. The patch uses LC_ALL now.

Change-Id: I08c1600b05ad858d67d2a2e23fd3c0332000527d
Releases: master, 7.6
Resolves: #75141
Reviewed-on: https://review.typo3.org/47457
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index b58d9a4..15142ba 100644 (file)
@@ -2814,14 +2814,8 @@ class TypoScriptFrontendController
     {
         // Setting locale
         if ($this->config['config']['locale_all']) {
-            // There's a problem that PHP parses float values in scripts wrong if the
-            // locale LC_NUMERIC is set to something with a comma as decimal point
-            // Do we set all except LC_NUMERIC
-            $locale = setlocale(LC_COLLATE, $this->config['config']['locale_all']);
+            $locale = setlocale(LC_ALL, $this->config['config']['locale_all']);
             if ($locale) {
-                setlocale(LC_CTYPE, $this->config['config']['locale_all']);
-                setlocale(LC_MONETARY, $this->config['config']['locale_all']);
-                setlocale(LC_TIME, $this->config['config']['locale_all']);
                 $this->localeCharset = $this->csConvObj->get_locale_charset($this->config['config']['locale_all']);
             } else {
                 $this->getTimeTracker()->setTSlogMessage('Locale "' . htmlspecialchars($this->config['config']['locale_all']) . '" not found.', 3);