Skip to content
Browse files

MDL-25837 detect invalid course parameter when getting fast modinfo

  • Loading branch information...
1 parent 5a7f931 commit 4e70708de9f8ccd8098ad483d4527147bc2334e9 @skodak skodak committed Jan 12, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/moodlelib.php
View
4 lib/moodlelib.php
@@ -3045,6 +3045,10 @@ function &get_fast_modinfo(&$course, $userid=0) {
return $cache[$course->id];
}
+ if (!property_exists($course, 'modinfo')) {
+ debugging('Coding problem - missing course modinfo property in get_fast_modinfo() call');
+ }
+
if (empty($course->modinfo)) {
// no modinfo yet - load it
rebuild_course_cache($course->id);

0 comments on commit 4e70708

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