Fix non transversable var

This commit is contained in:
Laurent Destailleur 2020-03-12 12:42:34 +01:00
parent 31865d7ae5
commit f38134e44d

View File

@ -1601,8 +1601,10 @@ else
$c = new Categorie($db);
$cats = $c->containing($object->id, Categorie::TYPE_PRODUCT);
$arrayselected = array();
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
if (is_array($cats)) {
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
}
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
print "</td></tr>";