LS 3.1 vs php 5.3.1

Извращенцам посвящается. =) Я держу боевой сервак практически на альфа версисях ПО, и сегодня прилетело обновление php 5.3.1.
LS высыпалало пачку ошибок вида:
Deprecated: Assigning the return value of new by reference is deprecated in /www/classes/lib/external/DbSimple/Generic.php on line 113

Deprecated: Assigning the return value of new by reference is deprecated in /www/classes/lib/external/DbSimple/Generic.php on line 133

Deprecated: Assigning the return value of new by reference is deprecated in /www/classes/lib/external/DbSimple/Mysql.php on line 70

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'MSK/3,0/no DST' instead in /www/classes/modules/user/User.class.php on line 238

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'MSK/3,0/no DST' instead in /www/classes/modules/topic/Topic.class.php on line 481

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for 'MSK/3,0/no DST' instead in /www/classes/modules/topic/Topic.class.php on line 368


В первых строках php ругается на то, что используемые функции устарели и в следующих версиях php поддерживаться вообще не будут. Я не стал париться и вырубил вывод ошибок заменив в index.php строчку
error_reporting(E_ALL);
на
error_reporting(E_ALL ^ E_DEPRECATED);


А вот таймзону пришлось добавить. В index.php ниже строки error_reporting дописываем:
date_default_timezone_set('Europe/Moscow');

Список тайм зон можно посмотереть тут.

UPD Упомининие о таймзоне так же следует добавить в function.php

Profit!

Исправление в шаблоне developer

У меня небольшая просьба для разработчиков — в шаблоне developer переименовать файлы:

  • roar.css в Roar.css
  • autocompleter.css в Autocompleter.css

Причина тому, что на *nix серверах системах это два разных файла. Из-за этого не подгружаются стили и шаблон отображается некорректно.

Подключение плагинов под Windows [rev. 688]

Файл: Engine.class.php, функция InitPlugins

275: if($aPluginList = @file(Config::Get('path.root.server').'/classes/plugins/plugins.dat')) {
276: foreach ($aPluginList as $sPluginName) {


При обработке файла /classes/plugins/plugins.dat сформированного в Windows редакторе, в переменной $sPluginName остаются два символа с кодами 13 и 10.

Предлагаемое решение проблемы: обработка $sPluginName функцией trim.

275: if($aPluginList = @file(Config::Get('path.root.server').'/classes/plugins/plugins.dat')) {
276: foreach ($aPluginList as $sPluginName) {
+277: $sPluginName=trim($sPluginName);


Аналогичные проблемы найдены в:
Engine.class.php, функция InitPluginHooks
Lang.class.php, функиця LoadLangFiles
loader.php, строка 136