Skip to content

Commit

Permalink
fix: do not pass null to strpos (#384)
Browse files Browse the repository at this point in the history
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
  • Loading branch information
darthf1 authored Mar 21, 2022
1 parent 092e893 commit e3eb3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function isPartial(): bool
*/
public function isFinal(): bool
{
return false !== strpos($this->header('Upload-Concat'), Server::UPLOAD_TYPE_FINAL . ';');
return null !== ($header = $this->header('Upload-Concat')) && false !== strpos($header, Server::UPLOAD_TYPE_FINAL . ';');
}

/**
Expand Down

0 comments on commit e3eb3c1

Please sign in to comment.