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. Built from https://develop.svn.wordpress.org/branches/4.7@39607 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
db72974122
commit
b24993e4cd
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7.1-alpha-39606';
|
||||
$wp_version = '4.7.1-alpha-39607';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue