From 629fb5a47a3202283185a37e1442576cf7289c98 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 18 Jan 2025 00:44:19 -0700 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 1c9781935..c83fb2a53 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -730,6 +730,9 @@ class PublicApiController extends Controller ->map(function ($s) use ($user) { try { $status = StatusService::get($s->id, false); + if (! $status) { + return false; + } } catch (\Exception $e) { $status = false; } @@ -740,6 +743,9 @@ class PublicApiController extends Controller return $status; }) ->filter(function ($s) use ($onlyMedia) { + if (! $s) { + return false; + } if ($onlyMedia) { if ( ! isset($s['media_attachments']) ||