diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 6d4d4f5011096..8ef1b664a29f7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -548,7 +548,7 @@ if ($idaction > 0) { if (!$object->error) { - if (count($listofresourceid)) { + if (is_array($listofresourceid) && count($listofresourceid)) { foreach ($listofresourceid as $resource_id => $val) { $resource_type = 'dolresource'; $busy = 1;//GETPOSTINT('busy');