Media: Fall back to GD when loading URL in HHVM Imagick.

HHVM does not currently support loading URLs in its port of Imagick.
Fixes `test_wp_crop_image_url()` failure introduced in [36916].

See #35973.

git-svn-id: https://develop.svn.wordpress.org/trunk@36996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Schroder 2016-03-15 00:14:42 +00:00
parent 6152c81dd1
commit 2909283a7f
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
return false;
}
// HHVM Imagick does not support loading from URL, so fail to allow fallback to GD.
if ( defined( 'HHVM_VERSION' ) && isset( $args['path'] ) && preg_match( '|^https?://|', $args['path'] ) ) {
return false;
}
return true;
}