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

Props chandrapatel for initial patch.
Fixes #39195.

Built from https://develop.svn.wordpress.org/trunk@39580


git-svn-id: http://core.svn.wordpress.org/trunk@39520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-12-12 06:19:41 +00:00
parent 883689c816
commit 0a349c9641
2 changed files with 3 additions and 3 deletions

View File

@ -146,10 +146,10 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
try {
$this->image = new Imagick();
$file_parts = pathinfo( $this->file );
$file_extension = strtolower( pathinfo( $this->file, PATHINFO_EXTENSION ) );
$filename = $this->file;
if ( 'pdf' == strtolower( $file_parts['extension'] ) ) {
if ( 'pdf' == $file_extension ) {
$filename = $this->pdf_setup();
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39578';
$wp_version = '4.8-alpha-39580';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.