Skip to content

Commit

Permalink
Use nullsafe call syntax instead of additionnal check
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Gaussorgues <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
2 people authored and backportbot-nextcloud[bot] committed Sep 18, 2023
1 parent 90a14db commit 49d52dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ protected function checkShare(IShare $share): void {
$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'));
}
}
Expand Down

0 comments on commit 49d52dd

Please sign in to comment.