From 21788de56925b7c17ccd892910e871e5edb9be82 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 20 Nov 2025 01:45:08 +0000 Subject: [PATCH] * [bug#67333] Fix the bug of link product in project. --- module/project/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index c45888a98e..ea340c63d3 100755 --- a/module/project/model.php +++ b/module/project/model.php @@ -1989,7 +1989,7 @@ class projectModel extends model if(!empty($_POST['otherProducts'])) return $this->linkOtherProducts($projectID, $members); /* Link products of current program of the project. */ - $products = isset($_POST['products']) ? toIntArray($_POST['products']) : $products; + $products = isset($_POST['products']) ? (array)$_POST['products'] : $products; $oldProjectProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchGroup('product', 'branch'); $this->linkProducts($projectID, $products, $oldProjectProducts, $members); @@ -1997,7 +1997,7 @@ class projectModel extends model if($projectID > 0) { $executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetchPairs('id'); - $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec(); + $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin(toIntArray($products))->exec(); if(isset($_POST['stageBy']) and $_POST['stageBy'] == 'product') {