Skip to content

Commit 5b245bf

Browse files
committed
use the empty string instead of null as an array offset
1 parent 1a7a927 commit 5b245bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Mime/FileinfoMimeTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function guessMimeType(string $path): ?string
5353
}
5454

5555
try {
56-
$finfo = self::$finfoCache[$this->magicFile] ??= new \finfo(\FILEINFO_MIME_TYPE, $this->magicFile);
56+
$finfo = self::$finfoCache[$this->magicFile ?? ''] ??= new \finfo(\FILEINFO_MIME_TYPE, $this->magicFile);
5757
} catch (\Exception $e) {
5858
throw new RuntimeException($e->getMessage());
5959
}

0 commit comments

Comments
 (0)