Error "imagesavealpha() expects parameter 1 to be resource, null given"

Hi,

There is a non initialized variable $img in lib/jimIcon.php:109, causing the warning Error "imagesavealpha() expects parameter 1 to be resource, null given" each time housekeeping_common() is called.

Stack :

  1. RSSUtils::housekeeping_common()
  2. RSSUtils::cleanup_feed_icons()
  3. calculate_avg_color($iconFile)
  4. colorPalette($imageFile, $numColors, $granularity = 5)
  5. floIcon::readICO($file)
  6. jimIcon::fromiconstring($ico)
  7. line 109: call to imagesavealpha($img, true)

Ohhh, I see… right :slight_smile:

very nice, i’ll update this in tt-rss later today.

e: https://git.tt-rss.org/fox/tt-rss/commit/5738e422b5b8e4cf71559f4af39626240acde15f

Thanks a lot ! It’s working