From 43cf77629fec9b8febeadc06fdaacc16e760cc24 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Nov 2023 15:17:07 +0800 Subject: [PATCH] * Fix bug #40221. --- module/project/control.php | 2 +- module/project/ui/manageproducts.html.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/project/control.php b/module/project/control.php index 1fcf6c5817..7b6bbce422 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1463,7 +1463,7 @@ class project extends control /* If no product is selected, prompt error. */ $postProducts = $this->post->products; $postOtherProduct = $this->post->otherProducts; - if(!isset($postProducts) && !isset($postOtherProduct)) + if(empty($postProducts) && empty($postOtherProduct)) { return $this->send(array('result' => 'fail', 'message' => $this->lang->project->errorNoProducts)); } diff --git a/module/project/ui/manageproducts.html.php b/module/project/ui/manageproducts.html.php index c435d1ff3b..6e3d9b497f 100644 --- a/module/project/ui/manageproducts.html.php +++ b/module/project/ui/manageproducts.html.php @@ -191,6 +191,7 @@ form h::hr() ), + formHidden('post', 'post'), set::actions(array('submit')) );