From 729cbadc770fc8454f1e5a50fac27d8b6d7efe69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Tue, 30 Aug 2016 10:56:07 +0200 Subject: [PATCH] [Bridge] fix input parameter value storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- lib/Bridge.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index 8f0c356..f10b87e 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -248,8 +248,8 @@ abstract class BridgeAbstract implements BridgeInterface { foreach($this->parameters as $context=>$set){ $queriedContexts[$context]=null; foreach($set as $id=>$properties){ - if(isset($properties['value']) && - !empty($properties['value'])){ + if(isset($this->inputs[$context][$id]['value']) && + !empty($this->inputs[$context][$id]['value'])){ $queriedContexts[$context]=true; }elseif(isset($properties['required']) && $properties['required']===true){ @@ -314,7 +314,6 @@ abstract class BridgeAbstract implements BridgeInterface { foreach($this->parameters as $context=>$set){ if(isset($this->parameters[$context][$name])){ $this->inputs[$context][$name]['value']=$value; - $this->parameters[$context][$name]['value']=$value; } } } @@ -339,8 +338,8 @@ abstract class BridgeAbstract implements BridgeInterface { if(!isset($properties['type'])){ $this->parameters[$context][$name]['type']='text'; } - if(isset($properties['value'])){ - continue; + if(isset($this->inputs[$context][$name]['value'])){ + continue; } switch($properties['type']){ case 'checkbox':