Ensure APContact::getByUrl always returns an array

This commit is contained in:
Hypolite Petovan 2019-12-11 08:20:38 -05:00
parent 2d47952921
commit cf72bde93d

View file

@ -84,7 +84,7 @@ class APContact extends BaseObject
public static function getByURL($url, $update = null)
{
if (empty($url)) {
return false;
return [];
}
$fetched_contact = false;
@ -110,7 +110,7 @@ class APContact extends BaseObject
}
if (!is_null($update)) {
return DBA::isResult($apcontact) ? $apcontact : false;
return DBA::isResult($apcontact) ? $apcontact : [];
}
if (DBA::isResult($apcontact)) {