5

I've migrated my Craft project from CentOS/PHP5 to Ubuntu/PHP7 --- since then I'm seeing this message in /craft/storage/runtime/logs/phperrors.log

[14-Jun-2017 14:40:49 UTC] PHP Warning:  Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in /home/hidden/craft/app/services/UserSessionService.php on line 17
[14-Jun-2017 14:40:49 UTC] PHP Warning:  Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /home/hidden/craft/app/services/UserSessionService.php on line 17
[14-Jun-2017 15:50:53 UTC] PHP Warning:  Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in /home/hidden/craft/app/services/UserSessionService.php on line 17
[14-Jun-2017 15:50:53 UTC] PHP Warning:  Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /home/hidden/craft/app/services/UserSessionService.php on line 17
[14-Jun-2017 16:03:04 UTC] PHP Warning:  Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in /home/hidden/craft/app/services/UserSessionService.php on line 17
[14-Jun-2017 16:03:04 UTC] PHP Warning:  Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /home/hidden/craft/app/services/UserSessionService.php on line 17

Any Help?

6

It's a known issue you can safely ignore on Craft 2, that's been resolved for Craft 3.

PHP 7.0 (or maybe it was 7.1) changed the way that particular error was reported from E_STRICT (which Craft 2 is suppressing) to E_WARNING, which Craft 2 isn't suppressing, so now it pops up on latter versions of PHP.

1
  • 7
    Is there any chance of this fix being back-ported to Craft 2 at all? I've got a site that has over 1,000 of these errors in the PHP Errors log in less than 1 hour, which seems excessive and might mean I miss some important errors due to the noise. In fact, I suspect all my Craft 2 sites will have this too. – Stephen Oct 3 '17 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.