From 56f0f6d10c0ddcea154c56dcfb8f0b4aba5c6d5c Mon Sep 17 00:00:00 2001 From: andrei Date: Wed, 3 Apr 2002 23:04:36 +0000 Subject: [PATCH] Fixed undefined offset warning in {if} tag. --- Smarty_Compiler.class.php | 1 + libs/Smarty_Compiler.class.php | 1 + 2 files changed, 2 insertions(+) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 40178f7a..ff3ef881 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -924,6 +924,7 @@ class Smarty_Compiler extends Smarty { default: if($this->security && + $i+1 < count($tokens) && $tokens[$i+1] == '(' && preg_match('!^[a-zA-Z_]\w+$!', $tokens[$i]) && !in_array($tokens[$i], $this->security_settings['IF_FUNCS'])) { diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 40178f7a..ff3ef881 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -924,6 +924,7 @@ class Smarty_Compiler extends Smarty { default: if($this->security && + $i+1 < count($tokens) && $tokens[$i+1] == '(' && preg_match('!^[a-zA-Z_]\w+$!', $tokens[$i]) && !in_array($tokens[$i], $this->security_settings['IF_FUNCS'])) {