eval in prefilter
| From: | Andreas Heintze | Date: | Sun, 05 May 2002 13:31:49 +0000 |
| Subject: | eval in prefilter | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4057@lists.php.net to get a copy of this message | ||
I am trying to add an assignment in a prefilter through the {eval...
tag,
but I can't get it to work, why?
function test_Prefilter($tpl_source, &$smarty_obj)
{
$tpl_source = "{eval assign='email' var='test@test.com'}" .
$tpl_source;
return $tpl_source;
}
I get this error:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 3840 bytes) in
/home/e/expresst/www/lib/smarty/plugins/function.eval.php(24) : eval()'d
code on line 1
I also tried:
function test_Prefilter($tpl_source, &$smarty_obj)
{
$tpl_source = "{assign var='email' value='test@test.com'}{$email}"
.
$tpl_source;
return $tpl_source;
}
No error this time, but no sign of the email var on the page either!
Any idéas?
/Andreas