Merge pull request #19951 from FHenry/15.0_fix_warning

fix:silent warning php Select Lot
This commit is contained in:
Laurent Destailleur 2022-01-28 17:08:54 +01:00 committed by GitHub
commit e507fa12fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -655,11 +655,13 @@ class FormProduct
}
foreach ($productIdArray as $productId) {
foreach ($this->cache_lot[$productId] as $id => $arraytypes) {
if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) {
$label = $arraytypes['entrepot_label'].' - ';
$label .= $arraytypes['batch'];
$out .= '<option>'.$arraytypes['batch'].'</option>';
if (array_key_exists($productId, $this->cache_lot)) {
foreach ($this->cache_lot[$productId] as $id => $arraytypes) {
if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) {
$label = $arraytypes['entrepot_label'] . ' - ';
$label .= $arraytypes['batch'];
$out .= '<option>' . $arraytypes['batch'] . '</option>';
}
}
}
}