Skip to content

Commit

Permalink
fix nullish share error
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <[email protected]>
  • Loading branch information
dartcafe committed May 12, 2024
1 parent 30df685 commit 57b3c41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Model/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private function getAllowAccessPoll(): bool {
}

// return check result of an existing valid share for this user
return boolval($this->getShare()->getToken());
return boolval($this->getShare()?->getToken());
}

/**
Expand Down Expand Up @@ -373,7 +373,7 @@ private function getAllowAddOptions(): bool {
}

// public shares are not allowed to add options
if ($this->getShare()->getType() === Share::TYPE_PUBLIC) {
if ($this->getShare()?->getType() === Share::TYPE_PUBLIC) {
return false;
}

Expand Down Expand Up @@ -415,7 +415,7 @@ private function getAllowComment(): bool {
}

// public shares are not allowed to comment
if ($this->getShare()->getType() === Share::TYPE_PUBLIC) {
if ($this->getShare()?->getType() === Share::TYPE_PUBLIC) {
return false;
}

Expand Down Expand Up @@ -444,7 +444,7 @@ private function getAllowVote(): bool {
}

// public shares are not allowed to vote
if ($this->getShare()->getType() === Share::TYPE_PUBLIC) {
if ($this->getShare()?->getType() === Share::TYPE_PUBLIC) {
return false;
}

Expand Down

0 comments on commit 57b3c41

Please sign in to comment.