From 21145a1d59d536f5dcd14315c49d52a0650c43ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 13 Oct 2022 09:41:49 +0200 Subject: [PATCH] fix warnings --- .../product/stock/stocktransfer/class/stocktransfer.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index a71098fc2bf..5ffb56ced44 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) ---Put here your own copyright and developer email--- + * Copyright (C) 2022 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 @@ -229,7 +229,7 @@ class StockTransfer extends CommonObject // Translate some data of arrayofkeyval if (is_object($langs)) { foreach ($this->fields as $key => $val) { - if (is_array($val['arrayofkeyval'])) { + if (isset($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); }