fix(uoj-form-lib.php): Closes #13

This commit is contained in:
Billchenchina 2018-07-03 22:38:10 +08:00 committed by GitHub
commit 410fe66e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ EOD;
EOD;
$this->add($name, $html,
function($opt) use ($options) {
return isset($options, $opt) ? '' : "无效选项";
return isset($options[$opt]) ? '' : "无效选项";
},
'always_ok'
);
@ -165,7 +165,7 @@ EOD;
EOD;
$this->add($name, $html,
function($opt) use ($options) {
return isset($options, $opt) ? '' : "无效选项";
return isset($options[$opt]) ? '' : "无效选项";
},
'always_ok'
);