mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-30 08:26:42 +02:00
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:
parent
883689c816
commit
0a349c9641
@ -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.8-alpha-39578';
|
||||
$wp_version = '4.8-alpha-39580';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user