-
-
Notifications
You must be signed in to change notification settings - Fork 212
Undefined variable in branch 3.x #8868
Comments
That is true, however I don't see how this can result in cleaning the data? Since the property is never initialized, it should be |
Yes. Users which has been self logout manually, will be relogedin automatically. |
@contao/developers I guess we can just remove the if condition entirely, can't we? |
Our fix is replacing with this: |
Very interesting find. The variable is undefined because the User class is no longer based on Model since Contao 3. I don't understand why the check for |
Well it is possible to do a |
There is an additional problem with ModuleCloseAccount. We have to check, if the MemberRow still exists. The entry will be deleted afterwards it will be logout() |
IMHO, @aschempp What is the case in which we have to check |
We're using that in Contao 4 to determine if a user is loaded. |
@lindesbs Does this issue occur in Contao 4 as well? |
Not yet tested |
@lindesbs Do you have time to check? If it occurs in Contao 4 as well, we have to fix it. |
Obviously no further impact |
I still think we should fix this if we implement #8888. |
Fixed in 148cfde. |
Beginning of branch 3.x the variable blnRecordExists is used without initialized with data. This bug results in cleaning autologin data on logout()
The variable blnRecordExists in branch 2.11
Initialization in
https://github.com/contao/core/blob/2.11/system/libraries/Model.php#L77
Defined when row exists
https://github.com/contao/core/blob/2.11/system/libraries/Model.php#L178
In the branch 3.x it is used in
https://github.com/contao/core/blob/3.5/system/modules/core/classes/FrontendUser.php#L244
But this variable will never be defined
The text was updated successfully, but these errors were encountered: