From 758bb20750f9d325b518993648f394bbde3f2969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Dec 2020 18:55:39 +0100 Subject: [PATCH] fix undefined variable --- htdocs/product/class/product.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index dfb5a7e042a..c86e00602ea 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -828,7 +828,8 @@ class Product extends CommonObject $error = 0; // Check parameters - if (!$this->label) { $this->label = 'MISSING LABEL'; + if (!$this->label) { + $this->label = 'MISSING LABEL'; } // Clean parameters @@ -919,6 +920,9 @@ class Product extends CommonObject // If error, this->errors[] is filled if ($action != 'add') { $result = $this->verify(); // We don't check when update called during a create because verify was already done + } else { + // we can continue + $result = 0; } if ($result >= 0) {