diff --git a/src/app/history/controllers/HistoryController.php b/src/app/history/controllers/HistoryController.php index e329bb75e403d1a2016362f3665b2dc11f50d9d9..41a2359600fec2c6806a91a0d51feee810fd5318 100644 --- a/src/app/history/controllers/HistoryController.php +++ b/src/app/history/controllers/HistoryController.php @@ -210,7 +210,9 @@ class HistoryController $objects = array_column($objects, 'title', 'id'); foreach ($filteredHistoryIds as $key => $objectId) { - $history[$key]['label'] = $objects[$objectId]; + if (!empty($key)) { + $history[$key]['label'] = $objects[$objectId]; + } } } } @@ -433,7 +435,7 @@ class HistoryController } $queryParams = $request->getQueryParams(); - if (!empty($queryParams['onlyProof']) && (!$queryParams['onlyProof'] || empty($proofDocument))) { + if (!$queryParams['onlyProof'] || empty($proofDocument)) { $formattedHistory = HistoryController::getFormattedHistory(['id' => $args['id']]); $historyXml = HistoryController::arrayToXml(['data' => $formattedHistory['formattedHistory'], 'xml' => false]); $historyXmlPath = $tmpPath . 'maarchProof' . $GLOBALS['id'] . "_" . rand() . '.xml'; @@ -487,7 +489,8 @@ class HistoryController } } } - if (!empty($queryParams['onlyProof']) && !$queryParams['onlyProof']) { + + if (!$queryParams['onlyProof']) { if ($workflowCompleted && ($queryParams['eSignDocument'] ?? $hasCertificate)) { $contentType = 'ESIGN'; }