From: Roland Häder Date: Wed, 20 Jul 2022 09:47:43 +0000 (+0200) Subject: Changes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4b5ae32ec6847ca03aa8978ec8094c49b27693b6;p=friendica.git Changes: - ops, fixed variable name (thanks to @annando) - also used empty() for an empty array (and false/null) --- 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); }