Project

General

Profile

Actions

Bug #48991

closed

bug in LC_CTYPE and capital I in method or class name

Added by Ivan Dharma Kartolo almost 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2013-06-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Actions #1

Updated by Mathias Schreiber over 9 years ago

  • Status changed from New to Closed
  • Is Regression set to No

Line no longer present in master

Actions

Also available in: Atom PDF