diff options
author | fox <[email protected]> | 2023-02-13 20:43:04 +0300 |
---|---|---|
committer | fox <[email protected]> | 2023-02-13 20:43:04 +0300 |
commit | 7bbe71b81865e2ac5a4f0fdcc39476ab6ed3458e (patch) | |
tree | 671fda0b8620f033e0967578511778399d43b7af /include/colors.php | |
parent | 0cd4abe4eb3e1e326a942a2141f118cb3bba9abd (diff) | |
parent | 40afee5d1295729105dbebf7f042ccdadd9fae41 (diff) |
Merge pull request 'Fix calculating average color for *.ico' (#100) from yan12125/tt-rss:fix-ico-avg-color into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/100
Diffstat (limited to 'include/colors.php')
-rw-r--r-- | include/colors.php | 3 |
1 files changed, 2 insertions, 1 deletions
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)); } |