diff --git a/change_log.txt b/change_log.txt index 9b82a002..3642dfbe 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,6 @@ 01/01/2009 - bugfix for obtaining plugins which must be included (related to change of 12/30/2009) +- bugfix for {php} tag (trow an exception if allow_php_tag = false) 12/31/2009 - optimization of generated code for doublequoted strings containing variables diff --git a/libs/plugins/block.php.php b/libs/plugins/block.php.php index 362ec9c7..d1de7400 100644 --- a/libs/plugins/block.php.php +++ b/libs/plugins/block.php.php @@ -18,22 +18,10 @@ */ function smarty_block_php($params, $content, $smarty, &$repeat, $template) { - // get security settings - if ($template->security && isset($smarty->security_handler)) { - $sec_obj = $smarty->security_policy; - } else { - $sec_obj = $smarty; + if (!$smarty->allow_php_tag) { + throw new Exception("{php} is deprecated, set allow_php_tag = true to enable"); } - if (is_null($content)) { - if (!$smarty->allow_php_tag) { - trigger_error("{php} is deprecated, set allow_php_tag = true to enable", E_USER_WARNING); - } - return; - } - eval($content); - return ''; -} - +} ?>