mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-08 09:24:25 +03:00
Merge pull request #124 from kpoxas/master
Replace eval() with call_user_func_array()
This commit is contained in:
commit
cc405b84b0
|
@ -166,9 +166,8 @@ abstract class Action extends LsObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->sCurrentEventName=$aEvent['name'];
|
$this->sCurrentEventName=$aEvent['name'];
|
||||||
$sCmd='$result=$this->'.$aEvent['method'].'();';
|
|
||||||
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_before",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
|
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_before",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
|
||||||
eval($sCmd);
|
$result=call_user_func_array(array($this,$aEvent['method']),null);
|
||||||
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_after",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
|
$this->Hook_Run("action_event_".strtolower($this->sCurrentAction)."_after",array('event'=>$this->sCurrentEvent,'params'=>$this->GetParams()));
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue