diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-29 11:17:00 +0300 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-29 11:17:00 +0300 |
commit | 73b27cb871db0e12e2ca1ef4e1693ec609f4c35b (patch) | |
tree | f3f70ac3773624d97c21027b39c76e7285880d95 /lib | |
parent | adb8eb491f129c7382cee397e20085bfc375f9cb (diff) |
Fix a deprecation warning about returning bool from comparison function
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/DocumentService.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php index 8a69feeaa..9ab2e606b 100644 --- a/lib/Service/DocumentService.php +++ b/lib/Service/DocumentService.php @@ -412,7 +412,7 @@ class DocumentService { // Workaround to always open files with edit permissions if multiple occurences of // the same file id are in the user home, ideally we should also track the path of the file when opening usort($files, function (Node $a, Node $b) { - return ($a->getPermissions() & Constants::PERMISSION_UPDATE) < ($b->getPermissions() & Constants::PERMISSION_UPDATE); + return ($b->getPermissions() & Constants::PERMISSION_UPDATE) <=> ($a->getPermissions() & Constants::PERMISSION_UPDATE); }); return array_shift($files); |