]> git.wh0rd.org Git - tt-rss.git/commitdiff
colorPalette: try checking imagesize before invoking GD
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 14 Jun 2013 06:48:25 +0000 (10:48 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 14 Jun 2013 06:48:25 +0000 (10:48 +0400)
include/colors.php

index 91eaa2dc2c2dd4a1e69ce4097d94234f02a2b1ba..070be06a2363a1d3f35be8968557128fc055f70f 100644 (file)
@@ -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));
                }