Page 1 of 1

PHP Strict Standards - Error flood in log file after upgrade

Posted: Sat Jul 07, 2012 9:52 am
by dyfustic
Hi,

after updating to PHP 5.4.4 and S9Y 1.6.2 these errors occur in my logfile and there are not just a few ones, the log file is being flooded with those error messages.

Code: Select all

[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /path/installation/blog.addict.de/serendipity/include/plugin_api.inc.php on line 1041
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::hook_event() should not be called statically in /path/installation/blog.addict.de/serendipity/include/functions_entries.inc.php on line 1090
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::hook_event() should not be called statically, assuming $this from incompatible context in /path/installation/blog.addict.de/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php on line 252
[Tue Jul 03 21:58:34 2012] [error] [client 66.249.72.207] PHP Strict Standards:  Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically, assuming $this from incompatible context in /path/installation/blog.addict.de/serendipity/include/plugin_api.inc.php on line 1041
I disabled error logging to save diskspace. ;-) The blog seems to work fine, there just one umlaut issue I just posted in the bugs forum.

My questions:
1) Is this a S9Y code issue?
2) Or is the a (PHP) configuration issue (apart from disabling error logging to "solve" this. ;-) )
3) Or is this a PHP version issue with some incompatibility with S9y
4) Or something else?

If you need more information just ask.

dyfa

Re: PHP Strict Standards - Error flood in log file after upg

Posted: Sat Jul 07, 2012 10:05 am
by Timbalu
It is a change in PHP 5.4, which now reports E_STRICT errors on default.
Change and set to

Code: Select all

error_reporting(E_ALL & ~E_NOTICE ^ E_STRICT);
in serendipity_config.inc.php ~ line 54.

Re: PHP Strict Standards - Error flood in log file after upg

Posted: Mon Jul 09, 2012 12:42 pm
by garvinhicking
Hi!

Basically, yes, S9y is not meant to work with E_STRICT. This simply goes against an untyped scripting languages; E_STRICT completely changes the idea of how a scripted file should look like, and this goes against some coding styles we have collected in the past, where we only initialize unsafe variables, but work with less lines of code. We have tried to change many of these things to adapt to PHP 5.4 in our 1.7 and 2.0 trees though...

(Other than that, what Timbalu writes should help you :) )

Regards,
Garvin

Re: PHP Strict Standards - Error flood in log file after upg

Posted: Tue Jul 10, 2012 8:07 am
by dyfustic
Hi,

thanks. My logfiles went back to normal. ;-)

dyfa