- Timestamp:
- 12/12/2016 06:18:30 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r39303 r39580 147 147 try { 148 148 $this->image = new Imagick(); 149 $file_ parts = pathinfo( $this->file);149 $file_extension = strtolower( pathinfo( $this->file, PATHINFO_EXTENSION ) ); 150 150 $filename = $this->file; 151 151 152 if ( 'pdf' == strtolower( $file_parts['extension'] )) {152 if ( 'pdf' == $file_extension ) { 153 153 $filename = $this->pdf_setup(); 154 154 } -
trunk/tests/phpunit/tests/image/editor_gd.php
r31510 r39580 543 543 544 544 } 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 } 545 556 } -
trunk/tests/phpunit/tests/image/editor_imagick.php
r36998 r39580 532 532 unlink( $save_to_file ); 533 533 } 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 } 534 545 }
Note: See TracChangeset
for help on using the changeset viewer.