You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the error Typed property craft\web\Application::$edition must not be accessed before initialization
It has something to do with vendor/craftcms/cms/src/base/ApplicationTrait.php _preInit() where the edition is set after $this->getLog();
Setting the edition before $this->getLog(); looks like it solved the problem.
What happened?
Description
When having an invalid token in the url https://craftcms.com/?token=! you get a 500 server error in production mode instead of 400 bad request.
After debugging vendor/yiisoft/yii2/base/ErrorHandler.php:164
I get the error
Typed property craft\web\Application::$edition must not be accessed before initialization
It has something to do with vendor/craftcms/cms/src/base/ApplicationTrait.php _preInit() where the edition is set after $this->getLog();
Setting the edition before $this->getLog(); looks like it solved the problem.
Steps to reproduce
Expected behavior
A styled page saying
Bad Request
Invalid token
Actual behavior
In dev mode you get a HTTP 400 – Bad Request
In production mode you get an unstyled "An internal server error occurred." 500 error
Craft CMS version
5.6.4
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: