Skip to content

Commit

Permalink
[BUGFIX] Force type int for pid value
Browse files Browse the repository at this point in the history
Related: #953
  • Loading branch information
mschwemer committed Oct 9, 2024
1 parent 1e6f9f8 commit 3235d33
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .project/tests/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2645,11 +2645,6 @@ parameters:
count: 1
path: ../../Classes/EventListener/FlexFormParsingModifyEventListener.php

-
message: "#^Parameter \\#1 \\$uid of static method In2code\\\\Powermail\\\\Utility\\\\DatabaseUtility\\:\\:getPidForRecord\\(\\) expects int, int\\|string given\\.$#"
count: 1
path: ../../Classes/EventListener/FlexFormParsingModifyEventListener.php

-
message: "#^Property In2code\\\\Powermail\\\\EventListener\\\\FlexFormParsingModifyEventListener\\:\\:\\$allowedSheets type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private function getPidForCurrentRecord(): int
$request = $this->getRequest();
if ($request) {
$queryParams = $request->getQueryParams();
$uid = array_keys($queryParams['edit']['tt_content'] ?? [])[0] ?? 0;
$uid = (int)(array_keys($queryParams['edit']['tt_content'] ?? [])[0] ?? 0);
}
return DatabaseUtility::getPidForRecord($uid, 'tt_content');
}
Expand Down

0 comments on commit 3235d33

Please sign in to comment.