Fix default value of contact parameter of OStatus::import in mod/salmon

This commit is contained in:
Hypolite Petovan 2019-01-22 08:53:53 -05:00
parent 5d4bafb116
commit 0cc1a07cfa
2 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ function salmon_post(App $a, $xml = '') {
// Placeholder for hub discovery. // Placeholder for hub discovery.
$hub = ''; $hub = '';
$contact_rec = ((DBA::isResult($r)) ? $r[0] : null); $contact_rec = ((DBA::isResult($r)) ? $r[0] : []);
OStatus::import($data, $importer, $contact_rec, $hub); OStatus::import($data, $importer, $contact_rec, $hub);

View File

@ -74,7 +74,7 @@ class OStatus
$author["contact-id"] = $contact["id"]; $author["contact-id"] = $contact["id"];
$contact = null; $contact = [];
/* /*
This here would be better, but we would get problems with contacts from the statusnet addon 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"]); GContact::link($gcid, $contact["uid"], $contact["id"]);
} elseif ($contact["network"] != Protocol::DFRN) { } elseif ($contact["network"] != Protocol::DFRN) {
$contact = null; $contact = [];
} }
return $author; return $author;