From e980d5dcc416f6e56e73aa726f4083194b4b11ba Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Tue, 1 Feb 2022 14:51:36 -0400 Subject: [PATCH] PMCORE-2491 --- workflow/engine/classes/class.pmFunctions.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 5da34277b..440586d9d 100644 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -3201,16 +3201,16 @@ function PMFUnCancelCase($caseUID, $userUID) * @name PMFDynaFormFields * @label PMF DynaForm Fields * @param string | $dynUid | Dynaform ID | Id of the dynaform - * @param string | $appUid | Case ID | Id of the case - * @param int | $delIndex | Delegation index | Delegation index for case + * @param string | $appUid = '' | Case ID | Id of the case + * @param int | $delIndex = 0| Delegation index | Delegation index for case * @return array | $fields | List of fields | Return a list of fields */ -function PMFDynaFormFields($dynUid, $appUid = false, $delIndex = 0) +function PMFDynaFormFields($dynUid, $appUid = '', $delIndex = 0) { - $fields = array(); - $data = array(); + $fields = []; + $data = []; - if ($appUid !== false) { + if (!empty($appUid)) { if ($delIndex < 0) { throw new Exception(G::LoadTranslation('ID_INVALID_DELEGATION_INDEX_FOR_CASE') . "'" . $appUid . "'."); } @@ -3252,6 +3252,7 @@ function PMFDynaFormFields($dynUid, $appUid = false, $delIndex = 0) $fields[] = $value; } } + return $fields; }