You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Hi,
I'm using Piwik on a system with tr_TR.UTF-8 locale and this error shows up when running archiver:
Fatal error: Class 'Piwik_Db_Adapter_MysqlI' not found in /my_path_to_piwik/piwik/core/Db/Adapter.php on line 41
And that line is:
return 'Piwik_Db_Adapter_' . str_replace(' ', '', ucwords(str_replace('', ' ', strtolower($adapterName))));
Problem is strtolower doesn't lower MysqlI properly, it should lower to "mysqli" but in Turkish locale lower letter for "I" is "" so that makes "mysql". I think you should use a locale independent (or working only in latin1 locale) strtolower here, but I don't know what is the proper way to do that in php.
I run archiver with LC_ALL=C for a workaround and it works fine that way.
The text was updated successfully, but these errors were encountered:
interesting indeed.. If strtolower fails, other logic/algorithm will fail too.
For example if we add a 'renderer' with a 'i' letter in the name, the factory will fail.
(In [2327]) quick fixes #1437 - setlocale(LC_CTYPE, '') so strtolower(), strtoupper(), ucfirst(), and ucwords() aren't affected by locale
In the future, we might consider implementing a thread-safe alternative to using setlocale() given this warning:
The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale().
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Hi,
I'm using Piwik on a system with tr_TR.UTF-8 locale and this error shows up when running archiver:
Fatal error: Class 'Piwik_Db_Adapter_MysqlI' not found in /my_path_to_piwik/piwik/core/Db/Adapter.php on line 41
And that line is:
return 'Piwik_Db_Adapter_' . str_replace(' ', '', ucwords(str_replace('', ' ', strtolower($adapterName))));
Problem is strtolower doesn't lower MysqlI properly, it should lower to "mysqli" but in Turkish locale lower letter for "I" is "" so that makes "mysql". I think you should use a locale independent (or working only in latin1 locale) strtolower here, but I don't know what is the proper way to do that in php.
I run archiver with LC_ALL=C for a workaround and it works fine that way.
The text was updated successfully, but these errors were encountered: