make strict check for selected options in a select menu

without strict checking an option with value=0 will be treated as if
no option was selected.
This commit is contained in:
Uwe Steinmann 2017-09-28 20:48:29 +02:00
parent f1f439af8c
commit dde468ca9e

View File

@ -777,7 +777,7 @@ if(!is_writeable($settings->_configFilePath)) {
echo "<select class=\"chzn-select\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "").">";
foreach($conf['options'] as $key=>$opt) {
echo "<option value=\"".$key."\"";
if(in_array($key, $selections))
if(in_array($key, $selections, true))
echo " selected";
echo ">".htmlspecialchars($opt)."</option>";
}