Skip to content

Commit

Permalink
Force cast some parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Dec 16, 2023
1 parent 73a176b commit 658e854
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Resumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ public function handleTestChunk()
{
$identifier = $this->resumableParam($this->resumableOption['identifier']);
$filename = $this->resumableParam($this->resumableOption['filename']);
$chunkNumber = $this->resumableParam($this->resumableOption['chunkNumber']);
$chunkSize = $this->resumableParam($this->resumableOption['chunkSize']);
$totalChunks = $this->resumableParam($this->resumableOption['totalChunks']);
$chunkNumber = (int) $this->resumableParam($this->resumableOption['chunkNumber']);
$chunkSize = (int) $this->resumableParam($this->resumableOption['chunkSize']);
$totalChunks = (int) $this->resumableParam($this->resumableOption['totalChunks']);

if (!$this->isChunkUploaded($identifier, $filename, $chunkNumber)) {
return $this->response->header(204);
Expand All @@ -199,9 +199,9 @@ public function handleChunk()
$file = $this->request->file();
$identifier = $this->resumableParam($this->resumableOption['identifier']);
$filename = $this->resumableParam($this->resumableOption['filename']);
$chunkNumber = $this->resumableParam($this->resumableOption['chunkNumber']);
$chunkSize = $this->resumableParam($this->resumableOption['chunkSize']);
$totalChunks = $this->resumableParam($this->resumableOption['totalChunks']);
$chunkNumber = (int) $this->resumableParam($this->resumableOption['chunkNumber']);
$chunkSize = (int) $this->resumableParam($this->resumableOption['chunkSize']);
$totalChunks = (int) $this->resumableParam($this->resumableOption['totalChunks']);

if (!$this->isChunkUploaded($identifier, $filename, $chunkNumber)) {
$chunkFile = $this->tmpChunkDir($identifier) . DIRECTORY_SEPARATOR . $this->tmpChunkFilename($filename, $chunkNumber);
Expand Down

0 comments on commit 658e854

Please sign in to comment.