mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Prevent wrong data->notifications to be stored. Default to 0 if empty. MDL-14540 ; merged from 19_STABLE
This commit is contained in:
parent
5a620a8c2a
commit
05ac14ca68
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue