Fix mime type generator

This commit is contained in:
Bizley
2023-10-08 13:03:48 +02:00
parent bd296ebe04
commit 4addf02c26

View File

@@ -124,7 +124,8 @@ class MimeTypeController extends Controller
*/
\$mimeTypes = $array;
if (PHP_VERSION_ID >= 80100) {
# fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925
if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) {
\$mimeTypes = array_replace(\$mimeTypes, array('xz' => 'application/octet-stream'));
}