mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-59713 forms: prevent php warning when 'optional' option is missing
This commit is contained in:
parent
e517eb100c
commit
a4cdbff86c
@ -228,7 +228,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group {
|
||||
}
|
||||
break;
|
||||
case 'createElement':
|
||||
if ($arg[2]['optional']) {
|
||||
if (isset($arg[2]['optional']) && $arg[2]['optional']) {
|
||||
// When using the function addElement, rather than createElement, we still
|
||||
// enter this case, making this check necessary.
|
||||
if ($this->_usedcreateelement) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user