Changeset 42780
- Timestamp:
- 03/05/2018 01:02:20 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r42449 r42780 557 557 $displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP ); 558 558 559 // IMAGETYPE_ICO is only defined in PHP 5.3+. 560 if ( defined( 'IMAGETYPE_ICO' ) ) { 561 $displayable_image_types[] = IMAGETYPE_ICO; 562 } 563 559 564 $info = @getimagesize( $path ); 560 565 if ( empty( $info ) ) { -
trunk/tests/phpunit/tests/image/functions.php
r42343 r42780 62 62 ); 63 63 64 // IMAGETYPE_ICO is only defined in PHP 5.3+. 65 if ( defined( 'IMAGETYPE_ICO' ) ) { 66 $files[] = 'test-image.ico'; 67 } 68 64 69 foreach ( $files as $file ) { 65 70 $this->assertTrue( file_is_valid_image( DIR_TESTDATA . '/images/' . $file ), "file_is_valid_image($file) should return true" ); … … 87 92 'test-image.jpg', 88 93 ); 94 95 // IMAGETYPE_ICO is only defined in PHP 5.3+. 96 if ( defined( 'IMAGETYPE_ICO' ) ) { 97 $files[] = 'test-image.ico'; 98 } 89 99 90 100 foreach ( $files as $file ) {
Note: See TracChangeset
for help on using the changeset viewer.