From 4b5ae32ec6847ca03aa8978ec8094c49b27693b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 20 Jul 2022 11:47:43 +0200 Subject: [PATCH] Changes: - ops, fixed variable name (thanks to @annando) - also used empty() for an empty array (and false/null) --- src/Protocol/Diaspora.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index b09c94a087..71eee8f316 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -4020,12 +4020,12 @@ class Diaspora return; } - if (!$recipients) { + if (empty($recipients)) { Logger::debug('No recipients provided, fetching for user', ['uid' => $uid]); $recipients = DBA::selectToArray('contact', [], ['network' => Protocol::DIASPORA, 'uid' => $uid, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]); } - if (!$recipients) { + if (empty($recipients)) { Logger::warning('Cannot fetch recipients', ['uid' => $uid]); return; } @@ -4033,7 +4033,7 @@ class Diaspora $message = self::createProfileData($uid); // @todo Split this into single worker jobs - foreach ($recipientients as $recipient) { + foreach ($recipients as $recipient) { Logger::info('Send updated profile data for user ' . $uid . ' to contact ' . $recipient['id']); self::buildAndTransmit($owner, $recipient, 'profile', $message); } -- 2.39.5