Skip to content
Snippets Groups Projects
Commit 0c3fc300 authored by yogeshwar's avatar yogeshwar
Browse files

Fixes::157000819::yogeshwar::re-Fixed

parent 79014e99
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,13 @@ class gd {
$height = @imagesy($image);
} elseif (is_array($image)) {
list($key, $width) = each($image);
list($key, $height) = each($image);
$key = key($image);
$width = current($image);
next($image);
$key = key($image);
$height = current($image);
next($image);
$image = imagecreatetruecolor($width, $height);
} elseif (false !== (list($width, $height, $type) = @getimagesize($image))) {
......@@ -71,8 +76,8 @@ class gd {
}
$return = (
is_resource($image) &&
(get_resource_type($image) == "gd") &&
((is_resource($image) && get_resource_type($image) === 'gd') ||
(is_object($image) && $image instanceof \GDImage)) &&
isset($width) &&
isset($height) &&
(preg_match('/^[1-9][0-9]*$/', $width) !== false) &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment