]> git.mjollnir.org Git - moodle.git/commitdiff
merged, taking care of a warning
authortoyomoyo <toyomoyo>
Fri, 27 Oct 2006 02:15:02 +0000 (02:15 +0000)
committertoyomoyo <toyomoyo>
Fri, 27 Oct 2006 02:15:02 +0000 (02:15 +0000)
lib/dmllib.php

index ed26d18c8c5d126af77742aeed31d1908bf4edf6..a4491aa035c4d7f64b57b1573277d40c7a8ae015 100644 (file)
@@ -1301,8 +1301,10 @@ function update_record($table, $dataobject) {
 
     // Remove this record from record cache since it will change
     global $record_cache;
-    unset($record_cache[$table][$dataobject->id]);
-
+    if (isset($record_cache[$table][$dataobject->id])) {
+        unset($record_cache[$table][$dataobject->id]);
+    }
+    
 /// Temporary hack as part of phasing out all access to obsolete user tables  XXX
     if (!empty($CFG->rolesactive)) {
         if (in_array($table, array('user_students', 'user_teachers', 'user_coursecreators', 'user_admins'))) {