]> git.mjollnir.org Git - moodle.git/commitdiff
Prevent wrong data->notifications to be stored. Default to 0 if empty. MDL-14540...
authorstronk7 <stronk7>
Thu, 24 Apr 2008 17:11:40 +0000 (17:11 +0000)
committerstronk7 <stronk7>
Thu, 24 Apr 2008 17:11:40 +0000 (17:11 +0000)
mod/data/lib.php

index f03f928a3fdfb33af14507f1268f0179a8612bab..244c736567c4dd3e851aa39637175218a87060bd 100755 (executable)
@@ -652,6 +652,10 @@ function data_update_instance($data) {
         $data->assessed = 0;
     }
 
+    if (empty($data->notification)) {
+        $data->notification = 0;
+    }
+
     if (! update_record('data', $data)) {
         return false;
     }