1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +03:00

Merge pull request #124 from kpoxas/master

Replace eval() with call_user_func_array()
This commit is contained in:
Mzhelskiy Maxim 2012-05-13 10:07:29 -07:00
commit cc405b84b0

View file

@ -166,9 +166,8 @@ abstract class Action extends LsObject {
}
}
$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()));
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()));
return $result;
}