From c7da6f7a8f5a83e75b905b766c92e15778baa751 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 22 Apr 2003 20:46:12 +0000 Subject: [PATCH] Bug #363. When everyting is hidden at main-menu, error occurs. Changed the get_all_mods function to check this. --- course/lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/course/lib.php b/course/lib.php index 5f07cc4d03..4a549a0860 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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); + } } } -- 2.39.5