summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-18 02:40:38 +0200
committeremkael <emkael@tlen.pl>2018-10-18 02:40:38 +0200
commiteab8a101e7a3fcbb41e01a574985e06c5a3775de (patch)
tree60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
parent7f38be342c1495aeca418286c15c25c18ac9e142 (diff)
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_registerclass.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_registerclass.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php b/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
index de89b4c..8d18547 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
@@ -25,8 +25,8 @@ class Smarty_Internal_Method_RegisterClass
* @link http://www.smarty.net/docs/en/api.register.class.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $class_name
- * @param string $class_impl the referenced PHP class to
+ * @param string $class_name
+ * @param string $class_impl the referenced PHP class to
* register
*
* @return \Smarty|\Smarty_Internal_Template
@@ -34,7 +34,7 @@ class Smarty_Internal_Method_RegisterClass
*/
public function registerClass(Smarty_Internal_TemplateBase $obj, $class_name, $class_impl)
{
- $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
+ $smarty = $obj->_getSmartyObj();
// test if exists
if (!class_exists($class_impl)) {
throw new SmartyException("Undefined class '$class_impl' in register template class");
@@ -43,4 +43,4 @@ class Smarty_Internal_Method_RegisterClass
$smarty->registered_classes[ $class_name ] = $class_impl;
return $obj;
}
-} \ No newline at end of file
+}