custom_action : Use call_user_func_array() instead of call_user_func() to permit pass arg by reference

This commit is contained in:
Benjamin Renard 2017-04-28 10:29:50 +02:00
parent 251cb2b0e2
commit e226ebe684

View file

@ -44,7 +44,7 @@ if(LSsession :: startLSsession()) {
if (isset($_GET['valid']) || $config['noConfirmation']) { if (isset($_GET['valid']) || $config['noConfirmation']) {
$objectname=$object -> getDisplayName(); $objectname=$object -> getDisplayName();
LStemplate :: assign('pagetitle',$title.' : '.$objectname); LStemplate :: assign('pagetitle',$title.' : '.$objectname);
if (call_user_func($config['function'],$object)) { if (call_user_func_array($config['function'],array(&$object))) {
if ($config['disableOnSuccessMsg']!=true) { if ($config['disableOnSuccessMsg']!=true) {
if ($config['onSuccessMsgFormat']) { if ($config['onSuccessMsgFormat']) {
LSsession :: addInfo(getFData(__($config['onSuccessMsgFormat']),$objectname)); LSsession :: addInfo(getFData(__($config['onSuccessMsgFormat']),$objectname));