-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Description
Since #1152, we support SVG favicons. Reddit spout tries to use the post link as an favicon (since some subreddits share primarily images) but when the link is not an image but a HTML page, which happens to contain <svg
we pass it to Imagick, leading to exception like:
ImagickException(code: 420): no decode delegate for this image format `' @ error/blob.c/BlobToImage/362 at /home/jtojnar/Projects/selfoss/src/helpers/Image.php:187)
[stacktrace]
#0 /home/jtojnar/Projects/selfoss/src/helpers/Image.php(187): Imagick->readimageblob('<!doctype html>...')
#1 /home/jtojnar/Projects/selfoss/src/helpers/Image.php(88): helpers\\Image->loadImage('https://www.dai...', 'png', NULL, NULL)
#2 /home/jtojnar/Projects/selfoss/src/spouts/reddit/reddit2.php(158): helpers\\Image->fetchFavicon('https://www.dai...')
eddit2->getIcon()Projects/selfoss/src/helpers/ContentLoader.php(224): spouts\
#4 /home/jtojnar/Projects/selfoss/src/helpers/ContentLoader.php(63): helpers\\ContentLoader->fetch(Array)
#5 /home/jtojnar/Projects/selfoss/cliupdate.php(7): helpers\\ContentLoader->update()
#6 {main}
"