Permalink
Browse files

Committing a fix to the get_course_mods warning that I fixed in head …

…yesterday but forgot to commit here.
  • Loading branch information...
mjollnir_
mjollnir_ committed Feb 14, 2006
1 parent 181d29f commit 41fb3602d3d5a12761f26371f2091158541e39a8
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/datalib.php
View
@@ -2580,6 +2580,10 @@ function update_timezone_records($timezones) {
function get_course_mods($courseid) {
global $CFG;
+ if (empty($courseid)) {
+ return false; // avoid warnings
+ }
+
return get_records_sql("SELECT cm.*, m.name as modname
FROM {$CFG->prefix}modules m,
{$CFG->prefix}course_modules cm

0 comments on commit 41fb360

Please sign in to comment.