UserSessionService::afterLogin() uses different arguments than the method it extends and causes PHP 7 to log warnings.
PHP Warning: Declaration of CraftUserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /Users/Me/Sites/MyWebsite/craft/app/services/UserSessionService.php on line 17
Yeah this is a known issue, but fixing it would be a breaking change, so we have to live with the warnings until Craft 3 :(
This issue is causing my login screen to not function, so it's kind of a big deal.. Any thoughts on how to fix this, or at least patch it up until we can upgrade?
@unboring85 it's likely some other issue causing you to not be able to login. If you want to send some CP/(s)FTP access to [email protected] we can look into it.
@unboring85 Craft 2 already has logic in place that will suppress those errors: https://github.com/craftcms/cms/blob/572d2250c3bb7e37c9929c2fb1741dcb160987d7/src/etc/web/WebApp.php#L682
If this is actually the error you鈥檙e getting, then something in your stack must be overriding the PHP error handler, so PHP errors aren鈥檛 getting handled by Craft like they should be.
鈥r you can upgrade to Craft 3 ;)
Anything I can do to fix this? I am still seeing the issue in Craft 2.6.3015
@bobartlett see above comments? If you can鈥檛 figure it out and upgrading to Craft 3 isn鈥檛 an option, hit us up at [email protected] and we can try to help you from there.
My craft/storage/runtime/logs/phperrors.log is 75MB of this error/warning message. Any way to get rid of it?
@groe You can delete it periodically, either manually or via a cron job / deployment process. When you have a chance to upgrade the site to Craft 3, the error will stop showing up in there.