]> git.mxchange.org Git - friendica.git/commitdiff
Fix fetching contacts
authorMichael <heluecht@pirati.ca>
Thu, 16 Jul 2020 03:52:18 +0000 (03:52 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 16 Jul 2020 03:52:18 +0000 (03:52 +0000)
src/Model/Contact.php

index 179126ff10a644e2240411f8b391e0141d56dd17..646da57caa6170013b996fa62d81261643c69881 100644 (file)
@@ -211,11 +211,13 @@ class Contact
 
                // Add internal fields
                $removal = [];
-               foreach (['id', 'updated', 'network'] as $internal) {
-                       if (!in_array($internal, $fields)) {
-                               $fields[] = $internal;
-                               $removal[] = $internal;
-                       }       
+               if (!empty($fields)) {
+                       foreach (['id', 'updated', 'network'] as $internal) {
+                               if (!in_array($internal, $fields)) {
+                                       $fields[] = $internal;
+                                       $removal[] = $internal;
+                               }
+                       }
                }
 
                // We first try the nurl (http://server.tld/nick), most common case