From: vyshane Date: Wed, 24 May 2006 03:07:37 +0000 (+0000) Subject: Fix for undefined property notice when cron.php is run. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=941308d3704a0b576ea2aa0681cab0939c989637;p=moodle.git Fix for undefined property notice when cron.php is run. --- diff --git a/enrol/manual/enrol.php b/enrol/manual/enrol.php index 07afeea192..28ff6aefb5 100644 --- a/enrol/manual/enrol.php +++ b/enrol/manual/enrol.php @@ -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();