check if inbox exists

...to prevent warnings
This commit is contained in:
Matthias Pfefferle 2019-07-26 17:07:43 +02:00
parent 1ab723eb7a
commit 55303bf34c

View file

@ -188,8 +188,11 @@ function get_follower_inboxes( $user_id ) {
foreach ( $followers as $follower ) {
$inbox = \Activitypub\get_inbox_by_actor( $follower );
if ( ! $inbox ) {
continue;
}
// init array if empty
if ( ! empty( $inboxes[ $inbox ] ) ) {
if ( ! isset( $inboxes[ $inbox ] ) ) {
$inboxes[ $inbox ] = array();
}
$inboxes[ $inbox ][] = $follower;