]> git.mxchange.org Git - friendica.git/commitdiff
Add provision for result containing only connector profiles in Contact::getDetailsByURL
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 11 Jul 2020 13:18:18 +0000 (09:18 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 11 Jul 2020 13:18:18 +0000 (09:18 -0400)
src/Model/Contact.php

index b11919b52809ef74a6e1f357021453fa5f350e56..46104aaeae9061935bbb0ed2eae61485c4196433 100644 (file)
@@ -1077,7 +1077,6 @@ class Contact
                }
 
                if (DBA::isResult($r)) {
-                       $authoritativeResult = true;
                        // If there is more than one entry we filter out the connector networks
                        if (count($r) > 1) {
                                foreach ($r as $id => $result) {
@@ -1088,7 +1087,10 @@ class Contact
                        }
 
                        $profile = array_shift($r);
+               }
 
+               if (!empty($profile)) {
+                       $authoritativeResult = true;
                        // "bd" always contains the upcoming birthday of a contact.
                        // "birthday" might contain the birthday including the year of birth.
                        if ($profile["birthday"] > DBA::NULL_DATE) {