Skip to content
Browse files

Merge branch 'MDL-33441-21' of git://github.com/danpoltawski/moodle i…

…nto MOODLE_21_STABLE
  • Loading branch information...
2 parents ded3134 + 446bf5b commit 7d4c5ac5ab77d729362563576d5b83d5bd0faa4f @samhemelryk samhemelryk committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 course/lib.php
View
5 course/lib.php
@@ -2077,6 +2077,11 @@ function get_course_category_tree($id = 0, $depth = 0) {
return array($categories, $categoryids);
}
+ if (empty($categoryids)) {
+ // No categories available (probably all hidden).
+ return array();
+ }
+
// The depth is 0 this function has just been called so we can finish it off
list($ccselect, $ccjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');

0 comments on commit 7d4c5ac

Please sign in to comment.
Something went wrong with that request. Please try again.