From a64d837da88fdf7833245872f330e0324709efe5 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 28 Jan 2019 02:39:07 +0300 Subject: [PATCH] Static call class existence check in compiler --- .../smarty3/sysplugins/smarty_internal_templateparser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa-system/vendors/smarty3/sysplugins/smarty_internal_templateparser.php b/wa-system/vendors/smarty3/sysplugins/smarty_internal_templateparser.php index 317c0b17b..2a7e6c447 100644 --- a/wa-system/vendors/smarty3/sysplugins/smarty_internal_templateparser.php +++ b/wa-system/vendors/smarty3/sysplugins/smarty_internal_templateparser.php @@ -2684,7 +2684,7 @@ function yy_r118(){ if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor; } else { - $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; + $this->_retvalue = class_exists($this->yystack[$this->yyidx + -2]->minor) ? $this->yystack[$this->yyidx + -2]->minor . '::' . $this->yystack[$this->yyidx + 0]->minor : "''"; } } else { $this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting");