Re: custom function failure

From: Date: Tue, 27 Mar 2001 19:05:53 +0000
Subject: Re: custom function failure
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-454@lists.php.net to get a copy of this message
On Tue, 27 Mar 2001, taliku@balcab.ch wrote: > The i registred it in Smarty.class.php: > > 'makemenu' => 'smarty_func_makemenu' > > > Now i call the function in my template like this: > > {makemenu > > menu="home_/_news","projects","downloads","gaming","my_n-theme","site_info" > qstring=$qstring} > > > But it dont work: i get the half-menu and following errors: > > Warning: Missing argument 2 for smarty_func_makemenu() in > e:\htdocs\n-theme.com\site\smarty.add.php on line 349 > Warning: REG_EMPTY:½empty (sub)expression in > e:\htdocs\n-theme.com\site\smarty.add.php on line 361 > Warning: REG_EMPTY:½empty (sub)expression in > e:\htdocs\n-theme.com\site\smarty.add.php on line 361 > > > Does anyone know the problem? what can i do? The custom functions get passed all the parameters in an array, that is: function myfunc($params) { extract($params); // do stuff here } -Andrei "I still find each day too short for all the thoughts I want to think, all the walks I want to take, all the books I want to read, and all the friends I want to see." -John Burroughs

« previous php.smarty.general (#454) next »