summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php b/lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php
index ec69c55..9cb494a 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_unregisterfilter.php
@@ -19,14 +19,15 @@ class Smarty_Internal_Method_UnregisterFilter extends Smarty_Internal_Method_Reg
* @link http://www.smarty.net/docs/en/api.unregister.filter.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $type filter type
- * @param callback|string $callback
+ * @param string $type filter type
+ * @param callback|string $callback
*
* @return \Smarty|\Smarty_Internal_Template
+ * @throws \SmartyException
*/
public function unregisterFilter(Smarty_Internal_TemplateBase $obj, $type, $callback)
{
- $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
+ $smarty = $obj->_getSmartyObj();
$this->_checkFilterType($type);
if (isset($smarty->registered_filters[ $type ])) {
$name = is_string($callback) ? $callback : $this->_getFilterName($callback);
@@ -39,4 +40,4 @@ class Smarty_Internal_Method_UnregisterFilter extends Smarty_Internal_Method_Reg
}
return $obj;
}
-} \ No newline at end of file
+}