From 6076e7b8ce0cd47411b63f1b61192df1d42ba6f2 Mon Sep 17 00:00:00 2001 From: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:05:19 +0200 Subject: Use nullsafe call syntax instead of additionnal check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benjamin Gaussorgues Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> --- lib/private/Share20/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private') 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')); } } -- cgit v1.2.3