Prevent wrong data->notifications to be stored. Default to 0 if empty. MDL-14540
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user