From c5eb774fdd678524ac939782d85d7c4f9eaec4b6 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 1 Apr 2022 14:24:05 +0800 Subject: [PATCH] * Fix bug#21385. --- module/execution/model.php | 6 +++--- module/tree/model.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index bfac6c4405..713dc712f8 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1674,9 +1674,9 @@ class executionModel extends model $execution->days = $execution->days ? $execution->days : ''; $execution->totalHours = $this->dao->select('sum(days * hours) AS totalHours')->from(TABLE_TEAM)->where('root')->eq($execution->id)->andWhere('type')->eq('execution')->fetch('totalHours'); - $execution->totalEstimate = round($total->totalEstimate, 1); - $execution->totalConsumed = round($total->totalConsumed, 1); - $execution->totalLeft = round($total->totalLeft - $closedTotalLeft, 1); + $execution->totalEstimate = round((float)$total->totalEstimate, 1); + $execution->totalConsumed = round((float)$total->totalConsumed, 1); + $execution->totalLeft = round((float)($total->totalLeft - $closedTotalLeft), 1); $execution = $this->loadModel('file')->replaceImgURL($execution, 'desc'); if($setImgSize) $execution->desc = $this->file->setImgSize($execution->desc); diff --git a/module/tree/model.php b/module/tree/model.php index a67643938f..ae318d04cb 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -176,7 +176,7 @@ class treeModel extends model ksort($treeMenu); $topMenu = @array_shift($treeMenu); - $topMenu = explode("\n", trim($topMenu)); + $topMenu = explode("\n", trim((string)$topMenu)); $lastMenu[] = '/'; foreach($topMenu as $menu) {