From cf72bde93d95d14255ff547293981bee4ab92568 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 11 Dec 2019 08:20:38 -0500 Subject: [PATCH] Ensure APContact::getByUrl always returns an array --- src/Model/APContact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 346c4ec2f..e3c3a0a12 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)) {