Skip to content
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

fix(UserTrait): Fix backend initialization #48610

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

provokateurin
Copy link
Member

Summary

#47896 broke groupfolders tests with this error:

4) OCA\GroupFolders\Tests\Trash\TrashBackendTest::testHideDeletedTrashItemInDeletedParentFolderAcl
Error: Typed property OC\User\User::$backend must not be accessed before initialization

/home/jld3103/src/github.com/nextcloud/server/lib/private/User/User.php:104
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/lib/ACL/UserMapping/UserMappingManager.php:27
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/lib/ACL/RuleManager.php:112
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/lib/ACL/ACLManager.php:227
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/lib/Trash/TrashBackend.php:333
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/lib/Trash/TrashBackend.php:56
/home/jld3103/src/github.com/nextcloud/server/apps/groupfolders/tests/Trash/TrashBackendTest.php:203

It uses the createUser() method of the UserTrait which wasn't properly initializing the parent by calling the parent constructor.

Checklist

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin merged commit 356f3de into master Oct 8, 2024
177 checks passed
@provokateurin provokateurin deleted the fix/usertrait/backend-initialization branch October 8, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants