From: Andrew Dolgov Date: Fri, 14 Jun 2013 06:48:25 +0000 (+0400) Subject: colorPalette: try checking imagesize before invoking GD X-Git-Tag: 1.9~109 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8d1cfe8020404e2c4c9a2022fa75707582b26997;p=tt-rss.git colorPalette: try checking imagesize before invoking GD --- 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)); }