WordPress.org

Make WordPress Core

Changeset 37245


Ignore:
Timestamp:
04/19/2016 08:45:35 PM (4 years ago)
Author:
ocean90
Message:

Media: Resolve fatal error on resize with ImageMagick < 6.4.6

Improper checking for 'Imagick::ALPHACHANNEL_UNDEFINED' and
'Imagick::ALPHACHANNEL_OPAQUE' caused fatal errors for some users
with Imagick when compiled against ImageMagick < 6.4.6, when these
constants were introduced. Fixes these compatibility checks.

Merge of [37192] to the 4.5 branch.

Props gblsm.
Fixes #36501.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/src/wp-includes/class-wp-image-editor-imagick.php

    r36996 r37245  
    377377            if ( is_callable( array( $this->image, 'getImageAlphaChannel' ) )
    378378                && is_callable( array( $this->image, 'setImageAlphaChannel' ) )
    379                 && defined( Imagick::ALPHACHANNEL_UNDEFINED )
    380                 && defined( Imagick::ALPHACHANNEL_OPAQUE )
     379                && defined( 'Imagick::ALPHACHANNEL_UNDEFINED' )
     380                && defined( 'Imagick::ALPHACHANNEL_OPAQUE' )
    381381            ) {
    382382                if ( $this->image->getImageAlphaChannel() === Imagick::ALPHACHANNEL_UNDEFINED ) {
Note: See TracChangeset for help on using the changeset viewer.