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
System::import() may return unexpected instances #2152
Comments
I understand the problem, but I would assume it does not happen with |
It also happens when var_dump(get_class(\Contao\System::importStatic(\Contao\FrontendUser::class, 'Foo')));
var_dump(get_class(\Contao\System::importStatic(\Contao\BackendUser::class, 'Foo'))); |
yes, but isn't that how |
I think we can fix this by using both |
This happens only with classes that have a
I think the correct fix would be to use |
Affected version(s)
^4.9.4
Description
Since #1840 a
System#import()
orSystem::importStatic()
may return an unexpected instance. This is the case for theUser
import in Contao. How to reproduce it:If a third party extension imports the backend user before the frontend user is imported (e.g. through a hook), the frontend user is not used in all legacy classes. Which might lead to an invalid upload folder path in the
FormFileUpload
form field.The text was updated successfully, but these errors were encountered: