Fix: Undeclared global variable

This commit is contained in:
Abbes Bahfir 2018-10-09 16:10:04 +01:00
parent 9fe3e7b6c0
commit 8160dcec6a

View File

@ -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