From 87c9132a6d1509301ca6e81d287dbde573648bfb Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 20 Nov 2015 13:59:58 +0100 Subject: [PATCH] avoid error --- htdocs/core/class/extrafields.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 4b1907ba355..82754a309b9 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -814,6 +814,8 @@ class ExtraFields // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) { $InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]); + } else { + $InfoFieldList[4]=str_replace('$ID$','0',$InfoFieldList[4]); } //We have to join on extrafield table if (strpos($InfoFieldList[4], 'extra')!==false) @@ -1001,6 +1003,8 @@ class ExtraFields // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) { $InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]); + } else { + $InfoFieldList[4]=str_replace('$ID$','0',$InfoFieldList[4]); } // We have to join on extrafield table