Upgrade to 4.1.1

This commit is contained in:
Bastian Allgeier
2024-02-26 11:15:36 +01:00
parent 9345fc1a0b
commit 2e8aa1ed80
20 changed files with 123 additions and 171 deletions

View File

@@ -277,6 +277,15 @@ class File
if (is_array($rules['mime'] ?? null) === true) {
$mime = $this->mime();
// the MIME type could not be determined, but matching
// to it was requested explicitly
if ($mime === null) {
throw new Exception([
'key' => 'file.mime.missing',
'data' => ['filename' => $this->filename()]
]);
}
// determine if any pattern matches the MIME type;
// once any pattern matches, `$carry` is `true` and the rest is skipped
$matches = array_reduce(