From 8160dcec6a488be11b3d17a0df5bc2c7795a7c9c Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Tue, 9 Oct 2018 16:10:04 +0100 Subject: [PATCH] Fix: Undeclared global variable --- 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 b04dd735e49..ec4b95ad94c 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -382,7 +382,7 @@ class MyObject extends CommonObject $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); - global $action; + global $action,$hookmanager; $hookmanager->initHooks(array('myobjectdao')); $parameters=array('id'=>$this->id, 'getnomurl'=>$result); $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks