From 3b32505d141ac35164c84249be5aea6e4467a1bd Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 5 Jan 2014 16:57:05 +0100 Subject: [PATCH] API: Bugfix that wrong contact data was sent --- include/api.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/api.php b/include/api.php index 9c3bb15244..f234bd20dc 100644 --- a/include/api.php +++ b/include/api.php @@ -2166,6 +2166,9 @@ function api_cleanup_share($shared) { function api_best_nickname(&$contacts) { $best_contact = array(); + if (count($contact) == 0) + return; + foreach ($contacts AS $contact) if ($contact["network"] == "") { $contact["network"] = "dfrn";