Merge pull request #19992 from rob006/mimeTypes-revert

Revert changes in `mimeTypes.php` from 4a1f2c6b9bc90427e91da73f5e8c8fa33d3c53c1
This commit is contained in:
Bizley
2023-10-06 14:34:24 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -4,13 +4,12 @@ Yii Framework 2 Change Log
2.0.50 under development
------------------------
- no changes in this release.
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
2.0.49.1 October 05, 2023
-------------------------
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
- Bug #19940: File Log writer without newline (terabytesoftw)
- Bug #19950: Fix `Query::groupBy(null)` causes error for PHP 8.1: `trim(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg)
- Bug #19951: Removed unneeded MIME file tests (schmunk42)

View File

@ -1003,7 +1003,8 @@ $mimeTypes = [
'zmm' => 'application/vnd.handheld-entertainment+xml',
];
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'));
}