1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Update PublicApiController

This commit is contained in:
Daniel Supernault 2022-01-07 19:47:21 -07:00
parent 24fbdf0afb
commit 0c1a0fa55b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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();