Pass Smarty reference to modifiers

From: Date: Wed, 02 Jun 2004 15:00:48 +0000
Subject: Pass Smarty reference to modifiers
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2380@lists.php.net to get a copy of this message
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.

« previous php.smarty.dev (#2380) next »