From 4fce0d3e7a81e090694df3fe95088d5276ab4fc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Nov 2019 15:52:57 +0100 Subject: [PATCH] Fix not transversable --- htdocs/compta/bank/card.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 4e58684b876..980cf6bd8f2 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -920,8 +920,11 @@ else $cate_arbo = $form->select_all_categories(Categorie::TYPE_ACCOUNT, '', 'parent', 64, 0, 1); $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_ACCOUNT); - 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 "";