From e17793eb4d299bdfc7a4a43381c3194283a4c078 Mon Sep 17 00:00:00 2001 From: messju Date: Sun, 22 Jun 2003 23:05:36 +0000 Subject: [PATCH] fixed propagation of $this into evald code in smarty_function_eval() --- libs/plugins/function.eval.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/plugins/function.eval.php b/libs/plugins/function.eval.php index e0a7a036..c72ceeff 100644 --- a/libs/plugins/function.eval.php +++ b/libs/plugins/function.eval.php @@ -30,8 +30,9 @@ function smarty_function_eval($params, &$smarty) } $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled); - + ob_start(); + $this =& $smarty; /* this should be done nicer, maybe */ eval('?>' . $_var_compiled); $_contents = ob_get_contents(); ob_end_clean();