mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 11:54:26 +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
|
01/01/2009
|
||||||
- bugfix for obtaining plugins which must be included (related to change of 12/30/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
|
12/31/2009
|
||||||
- optimization of generated code for doublequoted strings containing variables
|
- optimization of generated code for doublequoted strings containing variables
|
||||||
|
@@ -18,22 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
function smarty_block_php($params, $content, $smarty, &$repeat, $template)
|
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 (is_null($content)) {
|
|
||||||
if (!$smarty->allow_php_tag) {
|
if (!$smarty->allow_php_tag) {
|
||||||
trigger_error("{php} is deprecated, set allow_php_tag = true to enable", E_USER_WARNING);
|
throw new Exception("{php} is deprecated, set allow_php_tag = true to enable");
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
eval($content);
|
eval($content);
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user