WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/16/2016 05:38:41 AM (4 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.
Merges [39580] to the 4.7 branch.
Fixes #39195.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/tests/image/editor_imagick.php

    r36998 r39607  
    532532        unlink( $save_to_file );
    533533    }
     534
     535    /**
     536     * Test WP_Image_Editor_Imagick handles extension-less images
     537     * @ticket 39195
     538     */
     539    public function test_image_non_existent_extension() {
     540        $image_editor = new WP_Image_Editor_Imagick( DIR_TESTDATA.'/images/test-image-no-extension' );
     541        $result = $image_editor->load();
     542
     543        $this->assertTrue( $result );
     544    }
    534545}
Note: See TracChangeset for help on using the changeset viewer.