-
Notifications
You must be signed in to change notification settings - Fork 87
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 wrong object passed to the mount provider in VersionsBackend::getAllVersionedFiles #1725
Conversation
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
ace283b
to
bfdbd0b
Compare
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
bfdbd0b
to
2f8bb48
Compare
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2f8bb48
to
35f0f31
Compare
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
35f0f31
to
407c539
Compare
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
407c539
to
bb12117
Compare
/backport to stable 22 |
/backport to stable22 |
/backport to stable21 |
/backport to stable20 |
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
…AllVersionedFiles `$folder['groups']` is an array from groupId to permission. The mount provider only wants the permission, so since we want to get all the versionned files, just use 31 instead. Before php8, this code was working since using & for an int and an array gave an int. In php8, this now thrown an error. This also include more type hinting that helped me figure out that was wrong. Fix #1725: Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Hi Carl, Seems there is a typo in this commit (1725), in lib/Versions/VersionsBackend.php line 36 use OCP\Constant should be use OCP\Constants. on line 160, Constant::PERMISSION_ALL should be Constants::PERMISSION_ALL Thank you for the fix. |
Thanks just pushed a fix to master and stable23. |
Sorry seems it's not that simple. I get this error now : /opt/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php - line 160: /opt/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 66: /opt/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 57: /opt/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 39: /opt/nextcloud/lib/private/BackgroundJob/Job.php - line 51: /opt/nextcloud/lib/private/BackgroundJob/TimedJob.php - line 58: /opt/nextcloud/cron.php - line 127: I Will try to look at what happen, but I don't know the code base that much |
Hi @PhMetzger I created a pull request hopefully solving the problem once and for all :) #1753 Could you test it? Bonne soirée :) |
Just tested it, and it seems everything is fine. Thank you Carl Guten abend :) |
$folder['groups']
is an array from groupId to permission. The mountprovider only wants the permission, so since we want to get all the
versionned files, just use 31 instead.
Before php8, this code was working since using & for an int and an array
gave an int. In php8, this now thrown an error.
This also include more type hinting that helped me figure out that was
wrong.
Fix #1725