]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use nullsafe call syntax instead of additionnal check 40078/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, 28 Aug 2023 13:50:27 +0000 (13:50 +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 b03d304aa1e61877a31cf82f8ab2642c009bca5f..c7d09a3d6f743cb43980cde09b3cfdff96e8a25f 100644 (file)
@@ -1568,7 +1568,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'));
                                }
                        }