Skip to content

Commit

Permalink
refactor: use empty string check on guessExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 27, 2024
1 parent 4b5efac commit da47f21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/HTTP/Files/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public function getTempName(): string
*/
public function getExtension(): string
{
return ! in_array($this->guessExtension(), ['', '0'], true) ? $this->guessExtension() : $this->getClientExtension();
$guessExtension = $this->guessExtension();
return $guessExtension !== '' ? $guessExtension : $this->getClientExtension();
}

/**
Expand Down

0 comments on commit da47f21

Please sign in to comment.