diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index d31652cf..c4227fd1 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1424,10 +1424,10 @@ class Smarty } } } else if ($resource_type != 'file') { - $readable = true; $template_source = null; - $resource_func = $this->_plugins['resource'][$resource_type][0][0]; - $readable = $resource_func($resource_name, $template_source, $this); + $readable = $this->_plugin_implementation_exists($this->_plugins['resource'][$resource_type][0][0]) + && call_user_func_array($this->_plugins['resource'][$resource_type][0][0], + array($resource_name, &$template_source, &$this)); } /* @@ -1456,7 +1456,6 @@ class Smarty } else { $php_resource = $template_source; } - return true; }