summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php b/lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php
index f53d9bc..a79db42 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_unregisterresource.php
@@ -25,16 +25,16 @@ class Smarty_Internal_Method_UnregisterResource
* @link http://www.smarty.net/docs/en/api.unregister.resource.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $type name of resource type
+ * @param string $type name of resource type
*
* @return \Smarty|\Smarty_Internal_Template
*/
public function unregisterResource(Smarty_Internal_TemplateBase $obj, $type)
{
- $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
+ $smarty = $obj->_getSmartyObj();
if (isset($smarty->registered_resources[ $type ])) {
unset($smarty->registered_resources[ $type ]);
}
return $obj;
}
-} \ No newline at end of file
+}