]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-image-editor-imagick.php
WordPress 4.7.1
[autoinstalls/wordpress.git] / wp-includes / class-wp-image-editor-imagick.php
index fc6fc933ae383bcd6e10c1b498a003dd0255f4bd..8f9b43cb8955d30b6d028029ab42a8e9998d3e9a 100644 (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();
                        }