]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use nullsafe call syntax instead of additionnal check 40476/head
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Thu, 10 Aug 2023 15:05:19 +0000 (17:05 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 18 Sep 2023 10:38:23 +0000 (10:38 +0000)
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
lib/private/Share20/Manager.php

index 9ed3ef46c97356ff90c13cf1d330f70551090fca..0b2fe03b5b8fd5a3c7ff3a3801ad77019150dc3d 100644 (file)
@@ -1563,7 +1563,7 @@ class Manager implements IManager {
                        $uids = array_unique([$share->getShareOwner(),$share->getSharedBy()]);
                        foreach ($uids as $uid) {
                                $user = $this->userManager->get($uid);
-                               if (($user !== null) && !$user->isEnabled()) {
+                               if ($user?->isEnabled() === false) {
                                        throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
                                }
                        }