From: Hypolite Petovan Date: Tue, 22 Jan 2019 13:53:53 +0000 (-0500) Subject: Fix default value of contact parameter of OStatus::import in mod/salmon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0cc1a07cfa98d5e6fdd273148aae2c0de76c3407;p=friendica.git Fix default value of contact parameter of OStatus::import in mod/salmon --- diff --git a/mod/salmon.php b/mod/salmon.php index 536a4516ce..84d2942d53 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -184,7 +184,7 @@ function salmon_post(App $a, $xml = '') { // Placeholder for hub discovery. $hub = ''; - $contact_rec = ((DBA::isResult($r)) ? $r[0] : null); + $contact_rec = ((DBA::isResult($r)) ? $r[0] : []); OStatus::import($data, $importer, $contact_rec, $hub); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index acb49efcc7..b1cc4f4020 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -74,7 +74,7 @@ class OStatus $author["contact-id"] = $contact["id"]; - $contact = null; + $contact = []; /* This here would be better, but we would get problems with contacts from the statusnet addon @@ -231,7 +231,7 @@ class OStatus GContact::link($gcid, $contact["uid"], $contact["id"]); } elseif ($contact["network"] != Protocol::DFRN) { - $contact = null; + $contact = []; } return $author;