From: Hypolite Petovan Date: Wed, 11 Dec 2019 13:20:38 +0000 (-0500) Subject: Ensure APContact::getByUrl always returns an array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cf72bde93d95d14255ff547293981bee4ab92568;p=friendica.git Ensure APContact::getByUrl always returns an array --- diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 346c4ec2f7..e3c3a0a12b 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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)) {