mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- bugfix on error message in smarty_internal_compile_block.php
- bugfix mb handling in strip modifier - bugfix for Smarty2 style registered compiler function on unnamed attribute passing like {tag $foo $bar}
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
29/03/2011
|
||||||
|
- bugfix on error message in smarty_internal_compile_block.php
|
||||||
|
- bugfix mb handling in strip modifier
|
||||||
|
- bugfix for Smarty2 style registered compiler function on unnamed attribute passing like {tag $foo $bar}
|
||||||
|
|
||||||
17/03/2011
|
17/03/2011
|
||||||
- bugfix on default {function} parameters when {function} was used in nocache sections
|
- bugfix on default {function} parameters when {function} was used in nocache sections
|
||||||
- bugfix on compiler object destruction. compiler_object property was by mistake unset.
|
- bugfix on compiler object destruction. compiler_object property was by mistake unset.
|
||||||
|
@@ -27,7 +27,7 @@ function smarty_modifiercompiler_strip($params, $compiler)
|
|||||||
if (!isset($params[1])) {
|
if (!isset($params[1])) {
|
||||||
$params[1] = "' '";
|
$params[1] = "' '";
|
||||||
}
|
}
|
||||||
return "preg_replace('!\s+!', {$params[1]},{$params[0]})";
|
return "preg_replace('!\s+!u', {$params[1]},{$params[0]})";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -104,7 +104,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
|||||||
$compiler->template->block_data[$_name]['compiled'] = true;
|
$compiler->template->block_data[$_name]['compiled'] = true;
|
||||||
}
|
}
|
||||||
if ($_name == null) {
|
if ($_name == null) {
|
||||||
$compiler->trigger_template_error('{$smarty.block.child} used out of context', $this->compiler->lex->taglineno);
|
$compiler->trigger_template_error('{$smarty.block.child} used out of context', $compiler->lex->taglineno);
|
||||||
}
|
}
|
||||||
// undefined child?
|
// undefined child?
|
||||||
if (!isset($compiler->template->block_data[$_name])) {
|
if (!isset($compiler->template->block_data[$_name])) {
|
||||||
|
@@ -172,8 +172,12 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
// if compiler function plugin call it now
|
// if compiler function plugin call it now
|
||||||
if ($type == Smarty::PLUGIN_COMPILER) {
|
if ($type == Smarty::PLUGIN_COMPILER) {
|
||||||
$new_args = array();
|
$new_args = array();
|
||||||
foreach ($args as $mixed) {
|
foreach ($args as $key => $mixed) {
|
||||||
|
if (is_array($mixed)) {
|
||||||
$new_args = array_merge($new_args, $mixed);
|
$new_args = array_merge($new_args, $mixed);
|
||||||
|
} else {
|
||||||
|
$new_args[$key] = $mixed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!$this->smarty->registered_plugins[$type][$tag][1]) {
|
if (!$this->smarty->registered_plugins[$type][$tag][1]) {
|
||||||
$this->tag_nocache = true;
|
$this->tag_nocache = true;
|
||||||
|
Reference in New Issue
Block a user