From 73b27cb871db0e12e2ca1ef4e1693ec609f4c35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 29 Mar 2022 10:17:00 +0200 Subject: Fix a deprecation warning about returning bool from comparison function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/Service/DocumentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.2.3