From a628acfd0bf855895ebb11ce3b65223c00cf5dee Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 16 Nov 2022 13:52:56 +0800 Subject: [PATCH] fix code error --- module/execution/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 4bc1ba9ad3..105c530a13 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1733,7 +1733,7 @@ class execution extends control $this->view->linkedBranches = $linkedBranches; } - if(empty($project->hasProduct)) + if(isset($project->hasProduct) and empty($project->hasProduct)) { $shadowProduct = $this->loadModel('product')->getShadowProductByProject($project->id); $productPlan = $this->loadModel('productplan')->getPairs($shadowProduct->id, '0,0', 'noclosed,unexpired', true); @@ -1744,7 +1744,7 @@ class execution extends control if(isset($_POST['attribute']) and in_array($_POST['attribute'], array('request', 'design', 'review'))) unset($_POST['plans']); /* No product execution link plans. */ - if(empty($project->hasProduct) and !empty($_POST['plans'])) + if(isset($project->hasProduct) and empty($project->hasProduct) and !empty($_POST['plans'])) { $plansItem = array(); foreach($_POST['plans'] as $planItem)