mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
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='')
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user