1
0
Fork 0
- ops, fixed variable name (thanks to @annando)
- also used empty() for an empty array (and false/null)
This commit is contained in:
Roland Häder 2022-07-20 11:47:43 +02:00
parent c35e11e01f
commit 4b5ae32ec6
Signed by: roland
GPG key ID: C82EDE5DDFA0BA77

View file

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