From 1825e640d146bff2e85ddf2d3064e802fc00ea4d Mon Sep 17 00:00:00 2001 From: xushenjie Date: Fri, 12 May 2023 07:04:32 +0000 Subject: [PATCH] * Adjust return type of programplanModel::updateSubStageAttr(). --- module/programplan/model.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 48d981cd06..2e2a208d3e 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1320,9 +1320,9 @@ class programplanModel extends model * @param int $planID * @param string $attribute * @access public - * @return true|null + * @return true */ - public function updateSubStageAttr(int $planID, string $attribute): bool|null + public function updateSubStageAttr(int $planID, string $attribute): bool { if($attribute == 'mix') return true; @@ -1330,11 +1330,13 @@ class programplanModel extends model ->where('parent')->eq($planID) ->andWhere('deleted')->eq(0) ->fetchAll('id'); + if(empty($subStageList)) return true; $this->dao->update(TABLE_EXECUTION)->set('attribute')->eq($attribute)->where('id')->in(array_keys($subStageList))->exec(); foreach($subStageList as $childID => $subStage) $this->updateSubStageAttr($childID, $attribute); + return true; } /**