Skip to content

Commit

Permalink
fix: request input type cast (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupi007 authored Aug 2, 2023
1 parent 635a777 commit 233f802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Request/DropzoneChunkedRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(Request $request)

private function fetchStringRequestInput(Request $request, string $key): string
{
$input = $request->request->get($key);
$input = (string) $request->request->get($key);

if (!\is_string($input)) {
throw new SoftFailException(sprintf('The "%s" request input key is missing.', $key));
Expand All @@ -43,7 +43,7 @@ private function fetchStringRequestInput(Request $request, string $key): string

private function fetchIntRequestInput(Request $request, string $key): int
{
$input = $request->request->get($key);
$input = (int) $request->request->get($key);

if (!\is_int($input)) {
throw new SoftFailException(sprintf('The "%s" request input key is missing.', $key));
Expand Down

0 comments on commit 233f802

Please sign in to comment.