diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 3f2833fde52..c3037ac9071 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1814,7 +1814,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!$object->isService() && !empty($conf->bom->enabled)) {
print '
| '.$form->textwithpicto($langs->trans("DefaultBOM"), $langs->trans("DefaultBOMDesc", $langs->transnoentitiesnoconv("Finished"))).' | ';
- $bomkey = "Bom:bom/class/bom.class.php:0:t.status=1 AND t.fk_product=".$object->id;
+ $bomkey = "Bom:bom/class/bom.class.php:0:t.status=1 AND t.fk_product=".((int) $object->id);
print $form->selectForForms($bomkey, 'fk_default_bom', $object->fk_default_bom, 1);
print ' |
';
}