From c87451499b085f8e8bad2cd9d9e4579bdb9d882c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 14 Nov 2012 22:19:32 +0000 Subject: [PATCH] Require Imagick 2.1.1 or greater, based on whether the queryFormats() method can be called statically. props markoheijnen, DH-Shredder. fixes #22308. git-svn-id: http://core.svn.wordpress.org/trunk@22581 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-imagick.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index f7012d5382..1f137fd959 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -26,7 +26,10 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { } /** - * Checks to see if current environment supports Imagick + * Checks to see if current environment supports Imagick. + * + * We require Imagick 2.1.1 or greater, based on whether the queryFormats() + * method can be called statically. * * @since 3.5.0 * @access public @@ -34,7 +37,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { * @return boolean */ public static function test( $args = null ) { - if ( ! extension_loaded( 'imagick' ) ) + if ( ! extension_loaded( 'imagick' ) || ! is_callable( 'Imagick', 'queryFormats' ) ) return false; return true;