From: Michael Date: Mon, 30 Apr 2018 16:46:49 +0000 (+0000) Subject: Improved logging, avoiding PHP warning X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a182dd340034616f21631cdaab1019a1bf9918fe;p=friendica.git Improved logging, avoiding PHP warning --- diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index ad7658a764..63bd2f83bc 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1426,9 +1426,12 @@ class DFRN Contact::markForArchival($contact); return -22; } + $pubkey = $fcontact['pubkey']; + } else { + $pubkey = ''; } - $envelope = Diaspora::buildMessage($atom, $owner, $contact, $owner['uprvkey'], $fcontact['pubkey'], $public_batch); + $envelope = Diaspora::buildMessage($atom, $owner, $contact, $owner['uprvkey'], $pubkey, $public_batch); // Create the endpoint for public posts. This is some WIP and should later be added to the probing if ($public_batch && empty($contact["batch"])) { diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index c56a2aa9bb..04e08edf52 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -199,7 +199,7 @@ class Delivery extends BaseObject */ private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup) { - logger('Deliver ' . $target_item["guid"] . ' via DFRN to ' . empty($contact['addr']) ? $contact['url'] : $contact['addr']); + logger('Deliver ' . $target_item["guid"] . ' via DFRN to ' . (empty($contact['addr']) ? $contact['url'] : $contact['addr'])); if ($cmd == self::MAIL) { $item = $target_item;