From vfleaking/uoj@43280f92d6.
Fix wrongly written `isset`s.
This commit is contained in:
TRCYX 2018-07-03 02:27:30 +08:00 committed by GitHub
parent 7dbd73552c
commit 29e99be073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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