Pass Smarty reference to modifiers
Dmitry Koteroff <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello.
Smarty.class.php, line 1696.
function _run_mod_handler()
{
...
foreach ($_var as $_key => $_val) {
$_args[0] = $_val;
$_var[$_key] = call_user_func_array($_func_name, $_args);
}
...
}
Why not to pass $this to modifier function? It's easy and
back-compatible:
call_user_func_array($_func_name, $_args, &$this);
--
Best regards,
Dmitry Koteroff.
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php