Commit 0c3df5fc authored by webchick's avatar webchick

Issue #2161955 by wiifm, dawehner, mikeytown2: HHVM compatibility .

parent 97dd7ca9
......@@ -326,13 +326,8 @@ public function createTmp(ImageInterface $image, $width, $height) {
* {@inheritdoc}
*/
public static function isAvailable() {
if ($check = get_extension_funcs('gd')) {
if (in_array('imagegd2', $check)) {
// GD2 support is available.
return TRUE;
}
}
return FALSE;
// GD2 support is available.
return function_exists('imagegd2');
}
/**
......
......@@ -44,14 +44,8 @@ public static function getInfo() {
}
protected function checkRequirements() {
$gd_available = FALSE;
if ($check = get_extension_funcs('gd')) {
if (in_array('imagegd2', $check)) {
// GD2 support is available.
$gd_available = TRUE;
}
}
if (!$gd_available) {
// GD2 support is available.
if (!function_exists('imagegd2')) {
return array(
'Image manipulations for the GD toolkit cannot run because the GD toolkit is not available.',
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment