Changeset 44441
- Timestamp:
- 01/07/2019 09:08:03 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r44438 r44441 2575 2575 } elseif ( 'text/plain' === $real_mime ) { 2576 2576 // A few common file types are occasionally detected as text/plain; allow those. 2577 if ( ! in_array( $type, array( 2577 if ( ! in_array( 2578 $type, 2579 array( 2578 2580 'text/plain', 2579 2581 'text/csv', … … 2581 2583 'text/tsv', 2582 2584 'text/vtt', 2583 ) ) 2585 ) 2586 ) 2584 2587 ) { 2585 2588 $type = $ext = false; 2586 2589 } 2587 } elseif ( 'text/rtf' === $real_mime ) {2590 } elseif ( 'text/rtf' === $real_mime ) { 2588 2591 // Special casing for RTF files. 2589 if ( ! in_array( $type, array( 2592 if ( ! in_array( 2593 $type, 2594 array( 2590 2595 'text/rtf', 2591 2596 'text/plain', 2592 2597 'application/rtf', 2593 ) ) 2598 ) 2599 ) 2594 2600 ) { 2595 2601 $type = $ext = false; -
trunk/tests/phpunit/tests/functions.php
r44438 r44441 1342 1342 'crazy-cdata.jpg', 1343 1343 array( 1344 'ext' => false,1345 'type' => false,1344 'ext' => false, 1345 'type' => false, 1346 1346 'proper_filename' => false, 1347 1347 ), … … 1352 1352 'crazy-cdata.doc', 1353 1353 array( 1354 'ext' => false,1355 'type' => false,1354 'ext' => false, 1355 'type' => false, 1356 1356 'proper_filename' => false, 1357 1357 ), … … 1362 1362 'test.vtt', 1363 1363 array( 1364 'ext' => 'vtt',1365 'type' => 'text/vtt',1364 'ext' => 'vtt', 1365 'type' => 'text/vtt', 1366 1366 'proper_filename' => false, 1367 1367 ), … … 1371 1371 'test.csv', 1372 1372 array( 1373 'ext' => 'csv',1374 'type' => 'text/csv',1373 'ext' => 'csv', 1374 'type' => 'text/csv', 1375 1375 'proper_filename' => false, 1376 1376 ), … … 1381 1381 'test.rtf', 1382 1382 array( 1383 'ext' => 'rtf',1384 'type' => 'application/rtf',1383 'ext' => 'rtf', 1384 'type' => 'application/rtf', 1385 1385 'proper_filename' => false, 1386 1386 ),
Note: See TracChangeset
for help on using the changeset viewer.