From db6de3bfcdae95f8483a9232bb273dd556ffa785 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Mon, 17 Apr 2017 16:00:22 -0400 Subject: [PATCH] HOR-3041 --- .../src/ProcessMaker/BusinessModel/Cases/InputDocument.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InputDocument.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InputDocument.php index 0426def6b..5e0d328a7 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InputDocument.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InputDocument.php @@ -944,6 +944,12 @@ class InputDocument //***Validating the file allowed extensions*** $res = \G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]); if ($res->status == 0) { + //The value of the variable "_label" is cleared because the file load failed. + //The validation of the die command should be improved. + if (isset($aData["APP_DATA"][$item . "_label"]) && !empty($aData["APP_DATA"][$item . "_label"])) { + unset($aData["APP_DATA"][$item . "_label"]); + $caseInstance->updateCase($appUid, $aData); + } $message = $res->message; \G::SendMessageText($message, "ERROR"); $backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);