Skip to content

Commit 53f1619

Browse files
authored
Merge pull request #19992 from rob006/mimeTypes-revert
Revert changes in `mimeTypes.php` from 4a1f2c6
2 parents 290e03c + 9f51fe3 commit 53f1619

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

framework/CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ Yii Framework 2 Change Log
44
2.0.50 under development
55
------------------------
66

7-
- no changes in this release.
7+
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
88

99

1010
2.0.49.1 October 05, 2023
1111
-------------------------
1212

13-
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
1413
- Bug #19940: File Log writer without newline (terabytesoftw)
1514
- 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)
1615
- Bug #19951: Removed unneeded MIME file tests (schmunk42)

framework/helpers/mimeTypes.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,8 @@
10031003
'zmm' => 'application/vnd.handheld-entertainment+xml',
10041004
];
10051005

1006-
if (PHP_VERSION_ID >= 80100) {
1006+
# fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925
1007+
if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) {
10071008
$mimeTypes = array_replace($mimeTypes, array('xz' => 'application/octet-stream'));
10081009
}
10091010

0 commit comments

Comments
 (0)