removed warning when compiling empty template

This commit is contained in:
messju
2003-06-23 17:01:45 +00:00
parent 2eb044094c
commit 650cbd9bbe

View File

@@ -329,7 +329,7 @@ class Smarty_Compiler extends Smarty {
$compiled_content .= $text_blocks[$i]; $compiled_content .= $text_blocks[$i];
// remove \n from the end of the file, if any // 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); $compiled_content = substr($compiled_content, 0, -1);
} }