]> git.mxchange.org Git - friendica.git/commitdiff
Avoid a warning if a user hadn't subscribed to any forum.
authorMichael Vogel <icarus@dabo.de>
Sun, 24 Jan 2016 16:56:34 +0000 (17:56 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 24 Jan 2016 16:56:34 +0000 (17:56 +0100)
include/forums.php

index 995a29cad1411d0ec6280068ac9bfca52d1b00e1..952d09a494e51909a104bcc68ca12b862bdf36ce 100644 (file)
@@ -42,6 +42,9 @@ function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false
                        intval($uid)
        );
 
+       if (!$contacts)
+               return($forumlist);
+
        foreach($contacts as $contact) {
                $forumlist[] = array(
                        'url'   => $contact['url'],