Извращенцам посвящается. =) Я держу боевой сервак практически на альфа версисях ПО, и сегодня прилетело обновление 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 дописываем:
UPD Упомининие о таймзоне так же следует добавить в function.php
Profit!
4 комментария
В первых строках php ругается на то, что используемые функции устарели...
Не-а, не сами ф-ции устарели, а устарел синтаксис вовзврата значения по ссылке. Т.к. в PHP5 объекты всегда передаются по ссылке (в т.ч. и в возврате функций), то правильней будет просто убрать & из такой конструкции:
4 комментария
Это надо добавить в конфиг лайвстрит :)