From: Michael Vogel Date: Sun, 24 Jan 2016 16:56:34 +0000 (+0100) Subject: Avoid a warning if a user hadn't subscribed to any forum. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b409132f8608397deb07daa6ecc64134345ed6ff;p=friendica.git Avoid a warning if a user hadn't subscribed to any forum. --- diff --git a/include/forums.php b/include/forums.php index 995a29cad1..952d09a494 100644 --- a/include/forums.php +++ b/include/forums.php @@ -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'],