From 1fc91a22274ee8eba7d6e5a635a9ee8515ff5386 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 28 Aug 2024 16:46:37 +0800 Subject: [PATCH] * [task#127051,1h,0h] Fix error. --- module/block/zen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/block/zen.php b/module/block/zen.php index 0813d00e75..2d1a3e8a70 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -1264,7 +1264,8 @@ class blockZen extends block $plans = $this->loadModel('programplan')->getStage($this->session->project, $productID, 'all', 'order'); $plans = $this->programplan->initGanttPlans($plans); $plansProgress = $this->loadModel('metric')->getResultByCodeWithArray('progress_of_task_in_execution', array('execution' => implode(',', $plans['planIdList'])), 'cron'); // Get plan progress by metric. - $plans = $plans['datas']['data']; + $plans = $plans['datas'] ? $plans['datas']['data'] : array(); + /* Set progress from metric. */ foreach($plansProgress as $metric) {