diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 1120b78d038..ba14c32cda1 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6160,6 +6160,7 @@ class Form
$linktoelem='';
$linktoelemlist='';
+ $listofidcompanytoscan='';
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();