From 83412e3c90692961c3f2ce5aaaad85147d2b5e12 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2019 16:38:57 +0200 Subject: [PATCH] Fix warning --- htdocs/modulebuilder/template/class/myobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 3c68b0472e2..173fb975438 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -388,7 +388,7 @@ class MyObject extends CommonObject $sql = 'SELECT '; $sql .= $this->getFieldList(); $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element. ' as t'; - if ($this->ismultientitymanaged) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; else $sql .= ' WHERE 1 = 1'; // Manage filter $sqlwhere = array();