]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/groupsnav.php
Merge branch 'at-mention-url' into 'master'
[quix0rs-gnu-social.git] / lib / groupsnav.php
index 8439ab63992616d466de2c3ff8fca8be59efd1bb..f047e16a60e4a916111d8e07a00cf345192149fd 100644 (file)
@@ -58,7 +58,7 @@ class GroupsNav extends MoreMenu
 
     function haveGroups()
     {
-        return (!empty($this->groups) && ($this->groups->N > 0));
+        return ($this->groups instanceof User_group && $this->groups->N > 0);
     }
 
     function tag()
@@ -70,7 +70,7 @@ class GroupsNav extends MoreMenu
     {
         $items = array();
 
-        while ($this->groups->fetch()) {
+        while ($this->groups instanceof User_group && $this->groups->fetch()) {
             $items[] = array('placeholder',
                              array('nickname' => $this->groups->nickname,
                                    'mainpage' => $this->groups->homeUrl()),
@@ -91,7 +91,7 @@ class GroupsNav extends MoreMenu
                      _('See all groups you belong to.'));
     }
 
-    function item($actionName, $args, $label, $description, $id=null, $cls=null)
+    function item($actionName, array $args, $label, $description, $id=null, $cls=null)
     {
         if ($actionName != 'placeholder') {
             return parent::item($actionName, $args, $label, $description, $id, $cls);