From caf548e1a704e9576706e63f70392d8e908893e5 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 16 Jul 2020 03:52:18 +0000 Subject: [PATCH] Fix fetching contacts --- src/Model/Contact.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 179126ff10..646da57caa 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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