diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index f31aca727..5c25977ab 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -327,7 +327,7 @@ class PublicApiController extends Controller return $status; }) ->filter(function($s) use($filtered) { - return $s && in_array($s['account']['id'], $filtered) == false; + return $s && isset($s['account']) && in_array($s['account']['id'], $filtered) == false; }) ->values(); $res = $timeline->toArray(); @@ -397,7 +397,7 @@ class PublicApiController extends Controller return $status; }) ->filter(function($s) use($filtered) { - return in_array($s['account']['id'], $filtered) == false; + return isset($s['account']) && in_array($s['account']['id'], $filtered) == false; }) ->values() ->toArray();