[core] fix two-levels list default value support

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-28 11:08:32 +02:00
parent e74f526c19
commit fb05976fa6

View file

@ -319,7 +319,11 @@ abstract class BridgeAbstract implements BridgeInterface {
break;
case 'list':
if(!isset($properties['defaultValue'])){
$this->inputs[$context][$name]['value']=reset($properties['values']);
$firstItem=reset($properties['values']);
if(is_array($firstItem)){
$firstItem=reset($firstItem);
}
$this->inputs[$context][$name]['value']=$firstItem;
}else{
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
}