Don't set 'favicon_avg_color' on feed obj unless it's valid.

This commit is contained in:
wn_ 2023-02-03 01:28:15 +00:00
parent f484988967
commit b28d339bf2
1 changed files with 3 additions and 2 deletions

View File

@ -634,8 +634,9 @@ class RSSUtils {
$feed_obj->favicon_avg_color = 'fail';
$feed_obj->save();
$feed_obj->favicon_avg_color = \Colors\calculate_avg_color($favicon_cache->get_full_path($feed));
if ($feed_obj->favicon_avg_color) {
$calculated_avg_color = \Colors\calculate_avg_color($favicon_cache->get_full_path($feed));
if ($calculated_avg_color) {
$feed_obj->favicon_avg_color = $calculated_avg_color;
$feed_obj->save();
}