WordPress.org

Make WordPress Core

Ticket #22308: 22308-better-test.2.diff

File 22308-better-test.2.diff, 548 bytes (added by DH-Shredder, 3 years ago)

Refreshed Marko's Patch per the revert.

  • wp-includes/class-wp-image-editor-imagick.php

    diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
    index f7012d5..b405904 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    3434         * @return boolean 
    3535         */ 
    3636        public static function test( $args = null ) { 
    37                 if ( ! extension_loaded( 'imagick' ) ) 
     37                if ( ! extension_loaded( 'imagick' ) || ! is_callable( 'Imagick', 'queryFormats' ) ) 
    3838                        return false; 
    3939 
    4040                return true;