Make WordPress Core


Ignore:
Timestamp:
03/05/2018 01:02:20 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Media: Recognize .ico files as displayable images on PHP 5.3+ and allow attachment meta data to be generated for them.

Props remyvv, Guido07111975.
Fixes #43458.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/functions.php

    r42343 r42780  
    6262        );
    6363
     64        // IMAGETYPE_ICO is only defined in PHP 5.3+.
     65        if ( defined( 'IMAGETYPE_ICO' ) ) {
     66            $files[] = 'test-image.ico';
     67        }
     68
    6469        foreach ( $files as $file ) {
    6570            $this->assertTrue( file_is_valid_image( DIR_TESTDATA . '/images/' . $file ), "file_is_valid_image($file) should return true" );
     
    8792            'test-image.jpg',
    8893        );
     94
     95        // IMAGETYPE_ICO is only defined in PHP 5.3+.
     96        if ( defined( 'IMAGETYPE_ICO' ) ) {
     97            $files[] = 'test-image.ico';
     98        }
    8999
    90100        foreach ( $files as $file ) {
Note: See TracChangeset for help on using the changeset viewer.