minor fix get_parameter_switch
Former-commit-id: c8e430e1cbd789a99058217e7dffb4098aab821a
This commit is contained in:
parent
ec672d6bfb
commit
e397353f71
|
@ -862,9 +862,11 @@ function get_parameter_checkbox($name, $default='')
|
|||
*/
|
||||
function get_parameter_switch($name, $default='')
|
||||
{
|
||||
$data = get_parameter($name, 0);
|
||||
$data = get_parameter($name, null);
|
||||
|
||||
if ($data == 'on') {
|
||||
if ($data === null) {
|
||||
return 0;
|
||||
} else if ($data == 'on') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue