From 9af79e2582a1481c66ecfc9be519292e139c362e Mon Sep 17 00:00:00 2001 From: Mike Schroder Date: Tue, 15 Mar 2016 00:15:26 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@36996 git-svn-id: http://core.svn.wordpress.org/trunk@36963 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-imagick.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index 45a064346a..7632cbb4ba 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 66ab9504b3..64d6ca0d72 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta3-36995'; +$wp_version = '4.5-beta3-36996'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.