WordPress.org

Make WordPress Core

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

File 22308-better-test.3.diff, 743 bytes (added by mikeschroder, 6 years ago)

Now with comments!

  • 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..108a072 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    2828        /**
    2929         * Checks to see if current environment supports Imagick
    3030         *
     31         * Requires Imagick::queryFormats, which was introduced in Imagick 2.1.1
     32         *
    3133         * @since 3.5.0
    3234         * @access public
    3335         *
    3436         * @return boolean
    3537         */
    3638        public static function test( $args = null ) {
    37                 if ( ! extension_loaded( 'imagick' ) )
     39                if ( ! extension_loaded( 'imagick' ) || ! is_callable( 'Imagick', 'queryFormats' ) )
    3840                        return false;
    3941
    4042                return true;