* Fix task#8465.

This commit is contained in:
qiyu-xie
2020-11-24 11:16:58 +08:00
parent d6c3ea7967
commit 5288b68681
+11 -11
View File
@@ -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;