From 8f40f35c561d66cfc3a9f10a1bf05c2ffb97457e Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 6 Feb 2003 14:37:49 +0000 Subject: [PATCH] ignore case in IF statements --- NEWS | 1 + Smarty_Compiler.class.php | 2 +- libs/Smarty_Compiler.class.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4ab91637..c348ea90 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - ignore case in IF statements (Rainer Collet, Monte) - treat undefined constants as null (Ferdinand Beyer, Monte) - fix problem with inserts and nested fetches (Rainer Collet, Monte) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 76e172bf..192401c2 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -1103,7 +1103,7 @@ class Smarty_Compiler extends Smarty { $token = &$tokens[$i]; - switch ($token) { + switch (strtolower($token)) { case '!': case '%': case '!==': diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 76e172bf..192401c2 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1103,7 +1103,7 @@ class Smarty_Compiler extends Smarty { $token = &$tokens[$i]; - switch ($token) { + switch (strtolower($token)) { case '!': case '%': case '!==':