diff --git a/system/HTTP/Files/UploadedFile.php b/system/HTTP/Files/UploadedFile.php index 0626aeb5581f..a566fa7f67c7 100644 --- a/system/HTTP/Files/UploadedFile.php +++ b/system/HTTP/Files/UploadedFile.php @@ -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(); } /**