From 04eb385659002f15cadc91bd2342c701bfa8cf1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Wed, 15 Dec 2021 14:34:52 +0800 Subject: [PATCH] * Fix bug. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index d1e53ca07a..2546f3e5d0 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1699,7 +1699,7 @@ class projectModel extends model } /* Delete the execution linked products that is not linked with the execution. */ - if($projectID) + if((int)$projectID > 0) { $executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq((int)$projectID)->fetchPairs('id'); $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec();