From: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:05:19 +0000 (+0200) Subject: Use nullsafe call syntax instead of additionnal check X-Git-Tag: v27.1.0rc1~14^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6076e7b8ce0cd47411b63f1b61192df1d42ba6f2;p=nextcloud-server.git Use nullsafe call syntax instead of additionnal check Co-authored-by: Benjamin Gaussorgues Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> --- diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index b03d304aa1e..c7d09a3d6f7 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -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')); } }