Changeset 32171
- Timestamp:
- 04/20/2015 06:38:08 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r32116 r32171 2054 2054 2055 2055 foreach ( $mimes as $ext_preg => $mime_match ) { 2056 $ext_preg = '!\.(' . $ext_preg . ') (\?.*)?$!i';2056 $ext_preg = '!\.(' . $ext_preg . ')$!i'; 2057 2057 if ( preg_match( $ext_preg, $filename, $ext_matches ) ) { 2058 2058 $type = $mime_match; -
trunk/tests/phpunit/tests/media.php
r31694 r32171 532 532 } 533 533 534 function test_wp_check_filetype() {535 $url = 'http://example.com/testFile.mp4?autoplay=true&otherstuff=false';536 $filetype = wp_check_filetype( $url );537 $expected = array(538 'ext' => 'mp4',539 'type' => 'video/mp4'540 );541 $this->assertEquals( $expected, $filetype );542 }543 544 534 /** 545 535 * @ticket 22768
Note: See TracChangeset
for help on using the changeset viewer.