diff --git a/lib/REST/Miniflux/V1.php b/lib/REST/Miniflux/V1.php index 6832b902..1ca0e79c 100644 --- a/lib/REST/Miniflux/V1.php +++ b/lib/REST/Miniflux/V1.php @@ -814,12 +814,12 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler { } catch (ExceptionInput $e) { return new ErrorResponse("404", 404); } - if (!$icon['data']) { + if (!$icon || !$icon['data']) { return new ErrorResponse("404", 404); } return new Response([ 'id' => $icon['id'], - 'data' => ($icon['type'] ?? "application/octet-stream").";base64,".base64_encode($icon['data']), + 'data' => ($icon['type'] ?: "application/octet-stream").";base64,".base64_encode($icon['data']), 'mime_type' => $icon['type'], ]); } diff --git a/lib/REST/TinyTinyRSS/Icon.php b/lib/REST/TinyTinyRSS/Icon.php index b49ae4e4..9e7c7ec0 100644 --- a/lib/REST/TinyTinyRSS/Icon.php +++ b/lib/REST/TinyTinyRSS/Icon.php @@ -31,7 +31,7 @@ class Icon extends \JKingWeb\Arsse\REST\AbstractHandler { return new Response(404); } try { - $url = Arsse::$db->subscriptionIcon(Arsse::$user->id ?? null, (int) $match[1], false)['url']; + $url = Arsse::$db->subscriptionIcon(Arsse::$user->id ?? null, (int) $match[1], false)['url'] ?? null; if (!$url) { return new Response(404); }