- bugfix Smarty_Resource::load() did not always return a proper resource handler (Forum Topic 20414)

This commit is contained in:
rodneyrehm
2011-11-16 08:25:33 +00:00
parent 0c368eb1bb
commit 0fb537aed2
2 changed files with 7 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
16.11.2011
- bugfix Smarty_Resource::load() did not always return a proper resource handler (Forum Topic 20414)
===== Smarty-3.1.5 =====
14.11.2011
- bugfix allow space between function name and open bracket (forum topic 20375)

View File

@@ -349,10 +349,14 @@ abstract class Smarty_Resource {
// note registered to smarty is not kept unique!
return $smarty->_resource_handlers[$type];
}
if (!isset(self::$resources['registered'])) {
self::$resources['registered'] = new Smarty_Internal_Resource_Registered();
}
if (!isset($smarty->_resource_handlers[$type])) {
$smarty->_resource_handlers[$type] = self::$resources['registered'];
}
return $smarty->_resource_handlers[$type];
}