-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Site.php #16999
base: 11.2
Are you sure you want to change the base?
Update Site.php #16999
Conversation
Review Checklist
|
@AlternateIf We should fix it also for the domain attribute. Also the typehints of the setters of both should be changed from The rootId attribute should be nullable and initialised with null. Also the return typehint of the getter of rootId should be nullable. |
@blankse included your suggestions to this PR |
@AlternateIf Thank you. One more thing I see: The setRootDocument method doesn't set the rootId attribute. I think we should change setRootId/setRootDocument to this:
|
Quality Gate passedIssues Measures |
Upon Calling sites that don't exist a user is forwarded to error pages set on site.
In Pimcore 11 this leads to an error:
Uncaught PHP Exception Error: "Typed property Pimcore\Model\Site::$localizedErrorDocuments must not be accessed before initialization" at Site.php line 300 {"exception":"[object] (Error(code: 0): Typed property Pimcore\Model\Site::$localizedErrorDocuments must not be accessed before initialization at /home/frischeis/www/vendor/pimcore/pimcore/models/Site.php:300)"} []
This PR should solve the problem by initializing the property