Merge pull request #7360 from annando/fix-fatal

Fix fatal error with incomplete contact data upon delivery
This commit is contained in:
Philipp 2019-07-10 08:39:24 +02:00 committed by GitHub
commit 1b2b2259b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1455,6 +1455,11 @@ class DFRN
$dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]);
if (empty($dest_url)) {
Logger::info('Empty destination', ['public' => $public_batch, 'contact' => $contact]);
return -24;
}
$content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json"); $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
$postResult = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]); $postResult = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]);