]> git.mxchange.org Git - friendica.git/commitdiff
API: Bugfix that wrong contact data was sent
authorMichael Vogel <icarus@dabo.de>
Sun, 5 Jan 2014 15:57:05 +0000 (16:57 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 5 Jan 2014 15:57:05 +0000 (16:57 +0100)
include/api.php

index 9c3bb15244aa7d33366adffdf79b0a98805f1326..f234bd20dc79101dc315729cbd0bd052c82dc05f 100644 (file)
@@ -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";