]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #363. When everyting is hidden at main-menu, error occurs. Changed the get_all_mo...
authorstronk7 <stronk7>
Tue, 22 Apr 2003 20:46:12 +0000 (20:46 +0000)
committerstronk7 <stronk7>
Tue, 22 Apr 2003 20:46:12 +0000 (20:46 +0000)
course/lib.php

index 5f07cc4d0321628d1bb524380cd878d57c3a040a..4a549a0860ee9a492037976773b83b8dcaeecdb2 100644 (file)
@@ -472,7 +472,9 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname
                 $modnamesused[$mod->modname] = $modnames[$mod->modname];
             }
         }
-        asort($modnamesused);
+        if ($modnamesused) {
+            asort($modnamesused);
+        }
     }
 }