This commit is contained in:
the-djmaze 2023-01-26 15:53:00 +01:00
parent 271065fe44
commit 5b1404ffac

View file

@ -40,7 +40,8 @@ abstract class MimeType
\fclose($fp);
}
if ('application/zip' === \str_replace('/x-', '/', $mime)) {
$zip = new \ZipArchive($filename);
$zip = new \ZipArchive();
if ($zip->open($filename, \ZIPARCHIVE::RDONLY)) {
if (false !== $zip->locateName('word/_rels/document.xml.rels')) {
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
}
@ -49,6 +50,7 @@ abstract class MimeType
}
}
}
}
return $mime ? static::detectDeeper($mime, $name ?: $filename) : null;
}