summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_gettags.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_gettags.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_gettags.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_gettags.php b/lib/smarty3/sysplugins/smarty_internal_method_gettags.php
index ea727fd..c07ae07 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_gettags.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_gettags.php
@@ -28,15 +28,16 @@ class Smarty_Internal_Method_GetTags
* @param null|string|Smarty_Internal_Template $template
*
* @return array of tag/attributes
+ * @throws \Exception
* @throws \SmartyException
*/
public function getTags(Smarty_Internal_TemplateBase $obj, $template = null)
{
/* @var Smarty $smarty */
- $smarty = isset($this->smarty) ? $this->smarty : $obj;
- if ($obj->_objType == 2 && !isset($template)) {
+ $smarty = $obj->_getSmartyObj();
+ if ($obj->_isTplObj() && !isset($template)) {
$tpl = clone $obj;
- } elseif (isset($template) && $template->_objType == 2) {
+ } elseif (isset($template) && $template->_isTplObj()) {
$tpl = clone $template;
} elseif (isset($template) && is_string($template)) {
/* @var Smarty_Internal_Template $tpl */
@@ -52,11 +53,11 @@ class Smarty_Internal_Method_GetTags
$tpl->_cache[ 'used_tags' ] = array();
$tpl->smarty->merge_compiled_includes = false;
$tpl->smarty->disableSecurity();
- $tpl->caching = false;
+ $tpl->caching = Smarty::CACHING_OFF;
$tpl->loadCompiler();
$tpl->compiler->compileTemplate($tpl);
return $tpl->_cache[ 'used_tags' ];
}
- throw new SmartyException("Missing template specification");
+ throw new SmartyException('Missing template specification');
}
-} \ No newline at end of file
+}