Make WordPress Core


Ignore:
Timestamp:
12/12/2016 06:18:30 AM (8 years ago)
Author:
dd32
Message:

PDF Images: Avoid a PHP Warning when attempting to process a file without an extension.

Props chandrapatel for initial patch.
Fixes #39195.

File:
1 edited

Legend:

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

    r31510 r39580  
    543543
    544544    }
     545
     546    /**
     547     * Test WP_Image_Editor_GD handles extension-less images
     548     * @ticket 39195
     549     */
     550    public function test_image_non_existent_extension() {
     551        $image_editor = new WP_Image_Editor_GD( DIR_TESTDATA.'/images/test-image-no-extension' );
     552        $result = $image_editor->load();
     553
     554        $this->assertTrue( $result );
     555    }
    545556}
Note: See TracChangeset for help on using the changeset viewer.