]> git.mxchange.org Git - friendica.git/commitdiff
Improved logging, avoiding PHP warning
authorMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 16:46:49 +0000 (16:46 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 16:46:49 +0000 (16:46 +0000)
src/Protocol/DFRN.php
src/Worker/Delivery.php

index ad7658a7641a8fc8737e94bb019bbf51e2461071..63bd2f83bc9ff3aedfb7b4a96392dd7891c76631 100644 (file)
@@ -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"])) {
index c56a2aa9bbb3fdd666fef5b2f8abdc1796321761..04e08edf523e23cee747a23888a9c3d3e3c40821 100644 (file)
@@ -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;