Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-25837 detect invalid course parameter when getting fast modinfo

  • Loading branch information...
commit 4e70708de9f8ccd8098ad483d4527147bc2334e9 1 parent 5a7f931
Petr Skoda skodak authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 lib/moodlelib.php
4 lib/moodlelib.php
@@ -3045,6 +3045,10 @@ function &get_fast_modinfo(&$course, $userid=0) {
3045 3045 return $cache[$course->id];
3046 3046 }
3047 3047
  3048 + if (!property_exists($course, 'modinfo')) {
  3049 + debugging('Coding problem - missing course modinfo property in get_fast_modinfo() call');
  3050 + }
  3051 +
3048 3052 if (empty($course->modinfo)) {
3049 3053 // no modinfo yet - load it
3050 3054 rebuild_course_cache($course->id);

0 comments on commit 4e70708

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