mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
propperly check return value of setApprovalByXX
This commit is contained in:
parent
7e17ea145c
commit
7aaa02cf7d
|
@ -96,7 +96,7 @@ if ($_POST["approvalType"] == "ind") {
|
|||
else
|
||||
$file = '';
|
||||
$approvalLogID = $latestContent->setApprovalByInd($user, $user, $_POST["approvalStatus"], $comment, $file);
|
||||
if(0 > $approvalLogID) {
|
||||
if($approvalLogID === false || 0 > $approvalLogID) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approval_update_failed"));
|
||||
}
|
||||
else {
|
||||
|
@ -115,7 +115,7 @@ else if ($_POST["approvalType"] == "grp") {
|
|||
else
|
||||
$file = '';
|
||||
$approvalLogID = $latestContent->setApprovalByGrp($group, $user, $_POST["approvalStatus"], $comment, $file);
|
||||
if(0 > $approvalLogID) {
|
||||
if($approvalLogID === false || 0 > $approvalLogID) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approval_update_failed"));
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user