Ticket #36587: 36587.2.patch
File 36587.2.patch, 974 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/class-wp-image-editor-imagick.php
51 51 if ( ! extension_loaded( 'imagick' ) || ! class_exists( 'Imagick', false ) || ! class_exists( 'ImagickPixel', false ) ) 52 52 return false; 53 53 54 if ( version_compare( phpversion( 'imagick' ), '2.2.0', '<' ) ) 54 $imagick_version = phpversion( 'imagick' ); 55 if ( version_compare( $imagick_version, '2.2.0', '<' ) ) { 55 56 return false; 57 } 56 58 59 // Imagick 3.4 is throwing exceptions in PHP 7, see https://core.trac.wordpress.org/ticket/36587. 60 if ( version_compare( phpversion(), '7.0', '>=' ) && version_compare( $imagick_version, '3.4', '>=' ) && version_compare( $imagick_version, '3.4.2', '<' ) ) { 61 return false; 62 } 63 57 64 $required_methods = array( 58 65 'clear', 59 66 'destroy',