diff --git a/include/colors.php b/include/colors.php index 5682b55a1..64e24f8f1 100644 --- a/include/colors.php +++ b/include/colors.php @@ -355,8 +355,9 @@ function colorPalette(string $imageFile, int $numColors, int $granularity = 5): } else { $img = @$ico->images[count($ico->images)-1]->getImageResource(); } + } else { + return null; } - return null; } else if ($size[0] > 0 && $size[1] > 0) { $img = @imagecreatefromstring(file_get_contents($imageFile)); }