Skip to content
Snippets Groups Projects
Commit 3ffd3d6a authored by hahn's avatar hahn
Browse files

awx: add check is_array

parent 7b7893b5
Branches
No related tags found
1 merge request!195534 add docker
...@@ -178,7 +178,7 @@ class rollout_awx extends rollout_base { ...@@ -178,7 +178,7 @@ class rollout_awx extends rollout_base {
$sCmdChecks=''; $sCmdChecks='';
if($aConfig['extravars']){ if($aConfig['extravars']){
$aTmp=json_decode($aConfig['extravars']); $aTmp=json_decode($aConfig['extravars']);
if (!$aTmp || !count($aTmp) ){ if (!$aTmp || !is_array($aTmp) || !count($aTmp) ){
$sCmdChecks.='echo "ERROR: Value in extravars has wrong Syntax - this is no JSON: '.$aConfig['extravars'].'"; exit 1; '; $sCmdChecks.='echo "ERROR: Value in extravars has wrong Syntax - this is no JSON: '.$aConfig['extravars'].'"; exit 1; ';
} }
$aConfig['extravars']=json_encode($aTmp); $aConfig['extravars']=json_encode($aTmp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment