mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Adjust users of subscriptionIcon
This commit is contained in:
parent
cc2672fb0a
commit
76f1cc8e91
2 changed files with 3 additions and 3 deletions
|
@ -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'],
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue