From 31b11b77747ce6dec80cf59e06db5be34efdd169 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 24 Feb 2021 08:10:32 +0800 Subject: [PATCH] * Convert product ID to int type. --- module/program/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index 864bf26eb5..40413305c3 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1748,7 +1748,7 @@ class programModel extends model { foreach($_POST['products'] as $productID => $product) { - $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopPGM)->where('id')->eq($productID)->exec(); + $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopPGM)->where('id')->eq((int)$productID)->exec(); } } @@ -1817,7 +1817,7 @@ class programModel extends model { foreach($linkedProducts as $productID => $product) { - $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopPGM)->where('id')->eq($productID)->exec(); + $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopPGM)->where('id')->eq((int)$productID)->exec(); } } if($oldProject->parent != $project->parent) $this->processNode($projectID, $project->parent, $oldProject->path, $oldProject->grade);