Skip to content

Commit

Permalink
fixup! fixup! Switch to ListItem and add counter/second line
Browse files Browse the repository at this point in the history
  • Loading branch information
Chartman123 authored and jotoeri committed Jul 22, 2022
1 parent b60164b commit 1fcc472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/FormsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function getForm(int $id): array {
$result['canSubmit'] = $this->canSubmit($form->getId());

// Append submissionCount if currentUser is owner
if ($form->getOwnerId() === $this->currentUser->getUID()) {
if ($this->currentUser && $form->getOwnerId() === $this->currentUser->getUID()) {
$result['submissionCount'] = $this->submissionMapper->countSubmissions($id);
}

Expand All @@ -214,7 +214,7 @@ public function getPartialFormArray(int $id): array {
];

// Append submissionCount if currentUser is owner
if ($form->getOwnerId() === $this->currentUser->getUID()) {
if ($this->currentUser && $form->getOwnerId() === $this->currentUser->getUID()) {
$result['submissionCount'] = $this->submissionMapper->countSubmissions($id);
}

Expand Down

0 comments on commit 1fcc472

Please sign in to comment.