From 8d1cfe8020404e2c4c9a2022fa75707582b26997 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 14 Jun 2013 10:48:25 +0400 Subject: [PATCH] colorPalette: try checking imagesize before invoking GD --- include/colors.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/colors.php b/include/colors.php index 91eaa2dc..070be06a 100644 --- a/include/colors.php +++ b/include/colors.php @@ -298,7 +298,7 @@ function hsl2rgb($arr) { else $img = @$ico->images[count($ico->images)-1]->getImageResource(); - } else { + } else if ($size[0] > 0 && $size[1] > 0) { $img = @imagecreatefromstring(file_get_contents($imageFile)); } -- 2.39.5