diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2009-09-03 12:57:26 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2009-09-03 12:57:26 +0000 |
commit | 6bdcd2088ea89eab3a473ab62b81adefa6aa6f76 (patch) | |
tree | ef0f372eef27ffe5d40278b3e4173b4bde1c692b /modules/TemplateParser.pm | |
parent | e5b9c31e531eedc0523cd5cc22f6d008d9ff0da4 (diff) | |
download | MPC-6bdcd2088ea89eab3a473ab62b81adefa6aa6f76.tar.gz |
ChangeLogTag: Thu Sep 3 12:57:41 UTC 2009 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/TemplateParser.pm')
-rw-r--r-- | modules/TemplateParser.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm index 1639836a..6d4e5948 100644 --- a/modules/TemplateParser.pm +++ b/modules/TemplateParser.pm @@ -1973,7 +1973,7 @@ sub parse_line { push(@{$self->{'lines'}}, $self->{'built'}); } - return (!defined $errorString), $errorString; + return !defined $errorString, $errorString; } @@ -1983,12 +1983,12 @@ sub parse_file { $self->collect_data(); my($status, $errorString) = $self->cached_file_read($input); - if ($status) { - if (defined $self->{'sstack'}->[0]) { - $status = 0; - $errorString = "Missing an '$self->{'sstack'}->[0]' starting at " . - $self->{'lstack'}->[0]; - } + ## If there was no error, check the stack to make sure that we aren't + ## missing an <%endif%> or an <%endfor%>. + if ($status && defined $self->{'sstack'}->[0]) { + $status = 0; + $errorString = "Missing an '$self->{'sstack'}->[0]' starting at " . + $self->{'lstack'}->[0]; } ## Add in the line number if there is an error |