diff --git a/lib/Bridge.php b/lib/Bridge.php index 55c85c0..ff08d62 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -273,6 +273,23 @@ abstract class BridgeAbstract implements BridgeInterface { $this->returnClientError('Mixed context parameters'); }else{ $this->queriedContext=$queriedContext; + $contexts=array($this->queriedContext); + if(isset($this->parameters['global'])){ + $contexts[]='global'; + } + foreach($contexts as $context){ + foreach($this->parameters[$context] as $p=>$props){ + if(isset($props['type']) && + $props['type']==='checkbox' && + !isset($props['value'])){ + if(!isset($props['defaultValue'])){ + $this->parameters[$context][$p]['value']=false; + }else{ + $this->parameters[$context][$p]['value']=$props['defaultValue']; + } + } + } + } foreach($param as $name=>$value){ if(isset($this->parameters['global'][$name])){ $this->parameters[$queriedContext][$name]['value']=$value;