mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix {foreach} compilation failed when $smarty->merge_compiled_includes = true and pre-filters are used.
https://github.com/smarty-php/smarty/issues/172
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== 3.1.30-dev ===== (xx.xx.xx)
|
||||
01.02.2016
|
||||
- bugfix {foreach} compilation failed when $smarty->merge_compiled_includes = true and pre-filters are used.
|
||||
|
||||
29.01.2016
|
||||
- bugfix implement replacement code for _tag_stack property https://github.com/smarty-php/smarty/issues/151
|
||||
|
||||
|
@@ -175,7 +175,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
|
||||
// run pre filter if required
|
||||
if ((isset($nextCompiler->smarty->autoload_filters['pre']) ||
|
||||
isset($nextCompiler->smarty->registered_filters['pre']))) {
|
||||
$_content = $nextCompiler->smarty->ext->_filter_Handler->runFilter('pre', $_content, $nextCompiler->template);
|
||||
$_content = $nextCompiler->smarty->ext->_filterHandler->runFilter('pre', $_content, $nextCompiler->template);
|
||||
}
|
||||
$this->matchProperty($_content);
|
||||
}
|
||||
|
@@ -123,16 +123,13 @@ class Smarty_Internal_Extension_Handler
|
||||
public function __get($property_name)
|
||||
{
|
||||
// object properties of runtime template extensions will start with '_'
|
||||
if ($property_name[0] == '_') {
|
||||
if ($property_name[ 0 ] == '_') {
|
||||
$class = 'Smarty_Internal_Runtime_' . ucfirst(substr($property_name, 1));
|
||||
} else {
|
||||
$class = 'Smarty_Internal_Method_' . ucfirst($property_name);
|
||||
}
|
||||
if (class_exists($class)) {
|
||||
return $this->$property_name = new $class();
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call error handler for undefined method
|
||||
@@ -145,7 +142,7 @@ class Smarty_Internal_Extension_Handler
|
||||
*/
|
||||
public function __call($name, $args)
|
||||
{
|
||||
return call_user_func_array(array(new Smarty_Internal_Undefined(), $name), $args);
|
||||
return call_user_func_array(array(new Smarty_Internal_Undefined(), $name), array($this));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user