MDL-59713 forms: prevent php warning when 'optional' option is missing