From 3ffd3d6a6e9398ca0604918e69ffe88d27d2bdaa Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Thu, 21 Jul 2022 10:05:36 +0200
Subject: [PATCH] awx: add check is_array

---
 public_html/deployment/plugins/rollout/awx/rollout_awx.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public_html/deployment/plugins/rollout/awx/rollout_awx.php b/public_html/deployment/plugins/rollout/awx/rollout_awx.php
index a0df104b..7ffed5c5 100644
--- a/public_html/deployment/plugins/rollout/awx/rollout_awx.php
+++ b/public_html/deployment/plugins/rollout/awx/rollout_awx.php
@@ -178,7 +178,7 @@ class rollout_awx extends rollout_base {
         $sCmdChecks='';
         if($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; ';                
             }
             $aConfig['extravars']=json_encode($aTmp);
-- 
GitLab