From ae9764ebd115571a5fa28844d26c627647d6bc86 Mon Sep 17 00:00:00 2001 From: Yagami Date: Tue, 22 Nov 2022 09:30:28 +0800 Subject: [PATCH] * Finish task #77013. --- module/program/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/program/model.php b/module/program/model.php index 50948a015c..88d1e2fdce 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -99,7 +99,7 @@ class programModel extends model $productPrograms = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('type')->eq('program')->andWhere('deleted')->eq('0')->fetchPairs(); /* Put products of current program first.*/ - if(!empty($products) and $mode != 'assign' and $programID) + if(!empty($products) and isset($products[$programID]) and $mode != 'assign' and $programID) { $currentProgramProducts = $products[$programID]; unset($products[$programID]);