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:
parent
8227b30046
commit
c87451499b
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue