Issue Bug Closed

#48991bug in LC_CTYPE and capital I in method or class name

Ivan Dharma Kartolo 06/10/13, 14:05 updated 01/16/15, 18:40

Description

while setting

config.locale_all = az_AZ.utf8

following PHP fatal error will be shown

Fatal error: Call to undefined method t3lib_div::makeInstance() in /var/www/html/typo3_src-4.5.27/t3lib/class.t3lib_div.php on line 5297

after some debugging session, I found out that the bug is in class tslib_fe method settingLocale(). (TYPO3 4.5). There’s a exclusion, that if TR is used as locale, no LC_CTYPE is set. This exclusion is based on PHP bug issue from http://bugs.php.net/bug.php?id=35050. But the main bug issue is https://bugs.php.net/bug.php?id=18556. There is also mentioned that the problem with capital I in class or method name occurred not only with TR locale but also AZ and KU.

I am proposing following patch:

diff -ruw ../typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php
--- ../typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php    2013-05-24 16:27:37.000000000 +0200
+++ typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php    2013-06-10 13:38:31.000000000 +0200
@@ -2458,7 +2458,8 @@

                     // PHP fatals with uppercase I characters in method names with turkish locale LC_CTYPE
                     // @see http://bugs.php.net/bug.php?id=35050
-                if (substr($this->config['config']['locale_all'], 0, 2) != 'tr') {
+                //if (substr($this->config['config']['locale_all'], 0, 2) != 'tr') {
+                if (!t3lib_div::inList('tr,az',substr($this->config['config']['locale_all'], 0, 2))) {
                     setlocale(LC_CTYPE, $this->config['config']['locale_all']);
                 }

or better: just leave LC_CTYPE untouched, since TYPO3 4.5 =< always uses utf-8 charset.

best regards,

Ivan Kartolo

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.