NOBUG proper checking the value of checkbox elements
Without this patch, PHP generates notices as the variables representing unchecked checkboxes are not defined at all in $data object.
This commit is contained in:
+2
-2
@@ -84,11 +84,11 @@
|
||||
/// process data if submitted
|
||||
|
||||
//preprocess data
|
||||
if ($data->enrolstartdisabled){
|
||||
if (!empty($data->enrolstartdisabled)) {
|
||||
$data->enrolstartdate = 0;
|
||||
}
|
||||
|
||||
if ($data->enrolenddisabled) {
|
||||
if (!empty($data->enrolenddisabled)) {
|
||||
$data->enrolenddate = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user