minor fix get_parameter_switch

Former-commit-id: c8e430e1cbd789a99058217e7dffb4098aab821a
This commit is contained in:
fbsanchez 2019-02-15 14:03:16 +01:00
parent ec672d6bfb
commit e397353f71
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}