Ensure APContact::getByUrl always returns an array
This commit is contained in:
parent
2d47952921
commit
cf72bde93d
1 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue