mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix for {php} tag (trow an exception if allow_php_tag = false)
This commit is contained in:
@@ -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
|
||||
|
@@ -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 '';
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user