]> git.mxchange.org Git - friendica.git/commitdiff
Ensure APContact::getByUrl always returns an array
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:20:38 +0000 (08:20 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:25:44 +0000 (08:25 -0500)
src/Model/APContact.php

index 346c4ec2f74450757e5863a94a0a8c1fa74dc60c..e3c3a0a12b2f09fc51c7ca403e6f2c4ac91a0c65 100644 (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)) {