From 5288b68681a814cb0f4f4a43c72eebacbbde9256 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Tue, 24 Nov 2020 11:11:27 +0800 Subject: [PATCH] * Fix task#8465. --- module/program/model.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index b830db1bad..d15a18c4e1 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1208,18 +1208,18 @@ class programModel extends model if(dao::isError()) return false; } - } - /* Judge products not empty. */ - $linkedProductsCount = 0; - foreach($_POST['products'] as $product) - { - if(!empty($product)) $linkedProductsCount++; - } - if(empty($linkedProductsCount)) - { - dao::$errors[] = $this->lang->program->productNotEmpty; - return false; + /* Judge products not empty. */ + $linkedProductsCount = 0; + foreach($_POST['products'] as $product) + { + if(!empty($product)) $linkedProductsCount++; + } + if(empty($linkedProductsCount)) + { + dao::$errors[] = $this->lang->program->productNotEmpty; + return false; + } } $requiredFields = $this->config->program->PRJCreate->requiredFields;