From 650cbd9bbec2a5aef1bb3d6b41189d33e38f849b Mon Sep 17 00:00:00 2001 From: messju Date: Mon, 23 Jun 2003 17:01:45 +0000 Subject: [PATCH] removed warning when compiling empty template --- libs/Smarty_Compiler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index b7dfb99d..a679f8cf 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -329,7 +329,7 @@ class Smarty_Compiler extends Smarty { $compiled_content .= $text_blocks[$i]; // remove \n from the end of the file, if any - if ($compiled_content{strlen($compiled_content) - 1} == "\n" ) { + if (($_len=strlen($compiled_content)) && ($compiled_content{$_len - 1} == "\n" )) { $compiled_content = substr($compiled_content, 0, -1); }