Merge pull request #22567 from frederic34/patch-5

fix warnings
This commit is contained in:
Laurent Destailleur 2022-10-13 10:22:37 +02:00 committed by GitHub
commit 39b4053de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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 // Translate some data of arrayofkeyval
if (is_object($langs)) { if (is_object($langs)) {
foreach ($this->fields as $key => $val) { 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) { foreach ($val['arrayofkeyval'] as $key2 => $val2) {
$this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2);
} }