Improved logging, avoiding PHP warning

This commit is contained in:
Michael 2018-04-30 16:46:49 +00:00
parent 4909075321
commit a182dd3400
2 changed files with 5 additions and 2 deletions

View File

@ -1426,9 +1426,12 @@ class DFRN
Contact::markForArchival($contact); Contact::markForArchival($contact);
return -22; 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 // Create the endpoint for public posts. This is some WIP and should later be added to the probing
if ($public_batch && empty($contact["batch"])) { if ($public_batch && empty($contact["batch"])) {

View File

@ -199,7 +199,7 @@ class Delivery extends BaseObject
*/ */
private static function deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup) 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) { if ($cmd == self::MAIL) {
$item = $target_item; $item = $target_item;