Fix fatal error with incomplete contact data upon delivery
authorMichael Vogel <icarus@dabo.de>
Wed, 10 Jul 2019 03:16:50 +0000 (05:16 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 10 Jul 2019 03:16:50 +0000 (05:16 +0200)
src/Protocol/DFRN.php

index 3aa3ab9..44cd21c 100644 (file)
@@ -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]);