From 941308d3704a0b576ea2aa0681cab0939c989637 Mon Sep 17 00:00:00 2001 From: vyshane Date: Wed, 24 May 2006 03:07:37 +0000 Subject: [PATCH] Fix for undefined property notice when cron.php is run. --- enrol/manual/enrol.php | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.39.5