Skip to content

Commit a68e1ad

Browse files
committed
minor symfony#61676 use the empty string instead of null as an array offset (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- use the empty string instead of null as an array offset | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 5b245bf use the empty string instead of null as an array offset
2 parents 1a7a927 + 5b245bf commit a68e1ad

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)