* FIx bug for php8.1.

This commit is contained in:
wangyidong
2023-08-30 09:44:59 +08:00
parent 08622df920
commit 1116df848f
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -2620,7 +2620,7 @@ class executionModel extends model
$execution->days = $execution->days ? $execution->days : '';
$execution->totalEstimate = round((float)$total->totalEstimate, 1);
$execution->totalConsumed = round((float)$total->totalConsumed, 1);
$execution->totalLeft = round((float)($total->totalLeft - (float)$closedTotalLeft), 1);
$execution->totalLeft = round((float)$total->totalLeft - (float)$closedTotalLeft, 1);
$execution = $this->loadModel('file')->replaceImgURL($execution, 'desc');
if($setImgSize) $execution->desc = $this->file->setImgSize($execution->desc);
+4 -4
View File
@@ -975,7 +975,7 @@ class programplanModel extends model
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
{
$data->planDuration = $this->getDuration($data->begin, $data->end);
$data->realDuration = $this->getDuration($data->realBegan, $data->realEnd);
if(isset($data->realBegan) && isset($data->realEnd)) $data->realDuration = $this->getDuration($data->realBegan, $data->realEnd);
}
$projectChanged = false;
@@ -996,7 +996,7 @@ class programplanModel extends model
$this->dao->update(TABLE_PROJECT)->data($data)
->autoCheck()
->batchCheck($this->config->programplan->edit->requiredFields, 'notempty')
->checkIF($plan->percent != '' and $setPercent, 'percent', 'float')
->checkIF(!empty($data->percent) and $setPercent, 'percent', 'float')
->where('id')->eq($stageID)
->exec();
@@ -1053,7 +1053,7 @@ class programplanModel extends model
$this->dao->insert(TABLE_PROJECT)->data($data)
->autoCheck()
->batchCheck($this->config->programplan->create->requiredFields, 'notempty')
->checkIF($plan->percent != '' and $setPercent, 'percent', 'float')
->checkIF(!empty($data->percent) and $setPercent, 'percent', 'float')
->exec();
if(!dao::isError())
@@ -1258,7 +1258,7 @@ class programplanModel extends model
if($this->config->edition == 'max' or $this->config->edition == 'ipd')
{
$plan->planDuration = $this->getDuration($plan->begin, $plan->end);
$plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd);
if(isset($plan->realBegan) && isset($plan->realEnd)) $plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd);
}
if($planChanged) $plan->version = $oldPlan->version + 1;