Make WordPress Core

Ticket #35973: 35973.3.patch

File 35973.3.patch, 602 bytes (added by kirasong, 9 years ago)

Don't use HHVM when loading image file from URL.

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

    diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php
    index c769df2..db31757 100644
    a b class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    8484                        return false;
    8585                }
    8686
     87                // HHVM Imagick does not support loading from URL, so fail to allow fallback to GD.
     88                if ( defined( 'HHVM_VERSION' ) && isset( $args['path'] ) && preg_match( '|^https?://|', $args['path'] ) ) {
     89                        return false;
     90                }
     91
    8792                return true;
    8893        }
    8994