]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use nullsafe call syntax instead of additionnal check 39699/head
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Thu, 10 Aug 2023 15:05:19 +0000 (17:05 +0200)
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Mon, 28 Aug 2023 07:40:12 +0000 (09:40 +0200)
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 2e6b9ab840c2b98a0a6b0e90b5dd1cd4d9da1898..b03608f987265d2f4e5d0f5fdaaa07734446cb27 100644 (file)
@@ -1559,7 +1559,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'));
                                }
                        }