From 217b120db354250ff0ae5f7262f2a4a57751e44a Mon Sep 17 00:00:00 2001 From: messju Date: Mon, 28 Apr 2003 00:55:01 +0000 Subject: [PATCH] fixed issue with object-callback when fetching a php-resource --- libs/Smarty.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; }