diff --git a/htdocs/webportal/class/html.formlistwebportal.class.php b/htdocs/webportal/class/html.formlistwebportal.class.php
index 50a087bad68..717998a29b3 100644
--- a/htdocs/webportal/class/html.formlistwebportal.class.php
+++ b/htdocs/webportal/class/html.formlistwebportal.class.php
@@ -312,7 +312,7 @@ class FormListWebPortal
$sql .= " WHERE 1 = 1";
}
// filter on logged third-party
- $sql .= " AND t.fk_soc = " . $socid;
+ $sql .= " AND t.fk_soc = " . ((int) $socid);
foreach ($search as $key => $val) {
if (array_key_exists($key, $object->fields)) {