diff options
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php b/lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php index 3ca0eae..55e1596 100644 --- a/lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php +++ b/lib/smarty3/sysplugins/smarty_internal_method_unloadfilter.php @@ -19,19 +19,20 @@ class Smarty_Internal_Method_UnloadFilter extends Smarty_Internal_Method_LoadFil * @link http://www.smarty.net/docs/en/api.unload.filter.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj - * @param string $type filter type - * @param string $name filter name + * @param string $type filter type + * @param string $name filter name * - * @return bool + * @return Smarty_Internal_TemplateBase + * @throws \SmartyException */ public function unloadFilter(Smarty_Internal_TemplateBase $obj, $type, $name) { - $smarty = isset($obj->smarty) ? $obj->smarty : $obj; + $smarty = $obj->_getSmartyObj(); $this->_checkFilterType($type); if (isset($smarty->registered_filters[ $type ])) { $_filter_name = "smarty_{$type}filter_{$name}"; if (isset($smarty->registered_filters[ $type ][ $_filter_name ])) { - unset ($smarty->registered_filters[ $type ][ $_filter_name ]); + unset($smarty->registered_filters[ $type ][ $_filter_name ]); if (empty($smarty->registered_filters[ $type ])) { unset($smarty->registered_filters[ $type ]); } @@ -39,4 +40,4 @@ class Smarty_Internal_Method_UnloadFilter extends Smarty_Internal_Method_LoadFil } return $obj; } -}
\ No newline at end of file +} |