From 54d96da94ab05297226a5978999fbf2221f5ca49 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 10 Jul 2019 05:16:50 +0200 Subject: [PATCH 1/2] Fix fatal error with incomplete contact data upon delivery --- src/Protocol/DFRN.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 3aa3ab957c..44cd21c391 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1455,6 +1455,11 @@ class DFRN $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); + if (empty($dest_url)) { + Logger::info('Empty destination', ['contact' => $contact]); + return -24; + } + $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json"); $postResult = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]); From 6b25fd5b2fabb3e95476c391f014224121ebb1db Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 10 Jul 2019 05:19:54 +0200 Subject: [PATCH 2/2] added logging --- src/Protocol/DFRN.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 44cd21c391..84c4affc70 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1456,7 +1456,7 @@ class DFRN $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); if (empty($dest_url)) { - Logger::info('Empty destination', ['contact' => $contact]); + Logger::info('Empty destination', ['public' => $public_batch, 'contact' => $contact]); return -24; }