diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 9d2d9cda8d5..3fa27ce40fa 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -661,8 +661,8 @@ class Members extends DolibarrApi if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) { throw new RestException(403); } - if (is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) { - throw new RestException(422, 'Malformed data'); + if (!is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) { + throw new RestException(422, 'Malformed data: subscription start or end date, or subscription amount, is not numeric'); } $member = new Adherent($this->db); diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index b7d51181310..5a3c135b3f7 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -108,7 +108,7 @@ class FormOrder extends Form $tmpsupplierorder = new Commande($this->db); foreach ($statustohow as $value) { - $tmpsupplierorder->statut = $value; + $tmpsupplierorder->status = $value; $options[$value] = $tmpsupplierorder->getLibStatut($short); }