diff --git a/workflow/engine/src/BusinessModel/Cases.php b/workflow/engine/src/BusinessModel/Cases.php index 84b662901..2c95c1d2c 100644 --- a/workflow/engine/src/BusinessModel/Cases.php +++ b/workflow/engine/src/BusinessModel/Cases.php @@ -495,6 +495,8 @@ class Cases $ws = new \wsBase(); if ($variables) { $variables = array_shift($variables); + } elseif ($variables == null) { + $variables = array(array()); } $fields = $ws->newCaseImpersonate($processUid, $userUid, $variables, $taskUid); $array = json_decode(json_encode($fields), true); diff --git a/workflow/engine/src/Services/Api/ProcessMaker/Cases.php b/workflow/engine/src/Services/Api/ProcessMaker/Cases.php index 02df83ee6..14b5901f9 100644 --- a/workflow/engine/src/Services/Api/ProcessMaker/Cases.php +++ b/workflow/engine/src/Services/Api/ProcessMaker/Cases.php @@ -220,6 +220,7 @@ class Cases extends Api * @param string $usr_uid {@from body} {@min 32}{@max 32} * @param string $tas_uid {@from body} {@min 32}{@max 32} * @param array $variables {@from body} + * */ public function doPostCaseImpersonate($pro_uid, $usr_uid, $tas_uid, $variables=null) {