From 28c722ef598728c8b9e8c847f287f9bf544a67c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 8 Feb 2023 15:19:00 +0100 Subject: [PATCH] error message may be overwritten by other error message --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 60de90d819d..bb34fc2e3eb 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -14,7 +14,7 @@ * Copyright (C) 2014 Ion agorria * Copyright (C) 2016-2018 Ferran Marcet * Copyright (C) 2017 Gustavo Novaro - * Copyright (C) 2019-2022 Frédéric France + * Copyright (C) 2019-2023 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1566,7 +1566,7 @@ class Product extends CommonObject } } elseif (isset($this->multilangs[$key])) { if (empty($this->multilangs["$key"]["label"])) { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")); + $this->errors[] = $key . ' : ' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")); return -1; }