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
This commit is contained in:
Andrew Nacin 2012-11-14 22:19:32 +00:00
parent 8227b30046
commit c87451499b
1 changed files with 5 additions and 2 deletions

View File

@ -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 * @since 3.5.0
* @access public * @access public
@ -34,7 +37,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @return boolean * @return boolean
*/ */
public static function test( $args = null ) { public static function test( $args = null ) {
if ( ! extension_loaded( 'imagick' ) ) if ( ! extension_loaded( 'imagick' ) || ! is_callable( 'Imagick', 'queryFormats' ) )
return false; return false;
return true; return true;