]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for undefined property notice when cron.php is run.
authorvyshane <vyshane>
Wed, 24 May 2006 03:07:37 +0000 (03:07 +0000)
committervyshane <vyshane>
Wed, 24 May 2006 03:07:37 +0000 (03:07 +0000)
enrol/manual/enrol.php

index 07afeea192229de6de839260b0d2e92499913012..28ff6aefb5de6332e58cd3502cbf0a7bb481caf4 100644 (file)
@@ -353,6 +353,10 @@ function cron() {
 
     // Notify teachers/students about students who's enrolment are going to expire
     global $CFG;
+    if (empty($CFG->lastexpirynotify)) {
+        $CFG->lastexpirynotify = 0;
+    }
+    
     if ($CFG->lastexpirynotify < date('Ymd') && ($courses = get_records_select('course', 'enrolperiod > 0 AND expirynotify > 0 AND expirythreshold > 0'))) {
         $site = get_site();
         $admin = get_admin();