|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kubalaa Smarty n00b
Joined: 23 Jul 2004 Posts: 1
|
Posted: Fri Jul 23, 2004 8:22 pm Post subject: inconsistent handling of function passed to register_functio |
|
|
The simplest way to illustrate the problem is to change a call to register_function from passing a function name to an array (ala array(&$object, "method")), or the other way. The template will get a fatal error trying to use that function unless you recompile it.
The deeper problem is that you cannot expect to compile in the name of a dynamically-registered function. Some of my code dynamically generates new functions with unique names, and the name of the function may change from run to run. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Aug 14, 2004 8:57 pm Post subject: Re: inconsistent handling of function passed to register_fun |
|
|
kubalaa wrote: | The deeper problem is that you cannot expect to compile in the name of a dynamically-registered function. Some of my code dynamically generates new functions with unique names, and the name of the function may change from run to run. |
if you do that, register a static function and inside that dispatch to your dynamically changing functions. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|