Skip to content

Commit a7b2d1c

Browse files
IchHabRechtmschwemer
authored andcommitted
[TASK] Fix PHPStan validation
1 parent 2c49b53 commit a7b2d1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Classes/Controller/ModuleController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public function listAction(): ResponseInterface
9494
$formUids = $this->mailRepository->findGroupedFormUidsToGivenPageUid((int)$this->id);
9595
$mails = $this->mailRepository->findAllInPid((int)$this->id, $this->settings, $this->piVars);
9696

97-
$currentPage = (int)($this->request->getParsedBody()['currentPage'] ?? $this->request->getQueryParams()['currentPage'] ?? 1);
97+
$parsedBody = $this->request->getParsedBody() ?? [];
98+
assert(is_array($parsedBody));
99+
$currentPage = (int)($parsedBody['currentPage'] ?? $this->request->getQueryParams()['currentPage'] ?? 1);
98100
$currentPage = $currentPage > 0 ? $currentPage : 1;
99101

100102
$itemsPerPage = (int)($this->settings['perPage'] ?? 10);

0 commit comments

Comments
 (0)