Ticket #22308: 22308-better-test.diff
| File 22308-better-test.diff, 806 bytes (added by markoheijnen, 6 months ago) |
|---|
-
wp-includes/class-wp-image-editor-imagick.php
34 34 * @return boolean 35 35 */ 36 36 public static function test( $args = null ) { 37 if ( ! extension_loaded( 'imagick' ) )37 if ( ! extension_loaded( 'imagick' ) || ! is_callable( 'Imagick', 'queryFormats' ) ) 38 38 return false; 39 39 40 40 return true; … … 150 150 $imagick_extension = strtoupper( self::get_extension( $mime_type ) ); 151 151 152 152 try { 153 return ( (bool) $this->image->queryFormats( $imagick_extension ) );153 return ( (bool) Imagick::queryFormats( $imagick_extension ) ); 154 154 } 155 155 catch ( Exception $e ) { 156 156 return false;
