- instantiate classes of plugins instead of calling them static

This commit is contained in:
Uwe.Tews
2009-06-13 21:05:57 +00:00
parent 06ce127133
commit 18a3bb1971
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
06/13/2009
- bugfix at extend resource: create unique files for compiled template and cache for each combination of template files
- update extend resource to handle appen and prepend block attributes
- instantiate classes of plugins instead of calling them static
06/03/2009
- fixed repeat at block plugins

View File

@@ -45,7 +45,7 @@ class Smarty_Internal_Plugin_Handler extends Smarty_Internal_Base {
$plugin = 'smarty_' . $plugin_type . '_' . $name;
if ($this->smarty->loadPlugin($plugin)) {
if (class_exists($plugin, false)) {
$plugin = array($plugin, 'execute');
$plugin = array(new $plugin, 'execute');
}
if (is_callable($plugin)) {
$this->smarty->registered_plugins[$name] = array($plugin_type, $plugin, false);