mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
- bugfix Smarty_Resource::load() did not always return a proper resource handler (Forum Topic 20414)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user