Skip to content

Commit

Permalink
Merge pull request #2128 from MGatner/getextension-null
Browse files Browse the repository at this point in the history
guessExtension fallback to clientExtension
  • Loading branch information
lonnieezell authored Aug 13, 2019
2 parents d2f2ada + 8e4e17a commit 48ca50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/HTTP/Files/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ public function getExtension(): string
*
* @return string|null
*/
public function guessExtension(): ?string
public function guessExtension(): string
{
return Mimes::guessExtensionFromType($this->getClientMimeType(), $this->getClientExtension());
return Mimes::guessExtensionFromType($this->getClientMimeType(), $this->getClientExtension()) ?? $this->getClientExtension();
}

//--------------------------------------------------------------------
Expand Down

0 comments on commit 48ca50b

Please sign in to comment.