Skip to content

Commit

Permalink
Simplify check for unclosed sections
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 22, 2023
1 parent e477165 commit 64ba24d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/php/com/handlebarsjs/HandlebarsParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function parse(Tokenizer $tokens, $start= '{{', $end= '}}', $indent= '')
}

// Check for unclosed sections
if (!empty($state->parents)) {
if ($state->parents) {
$block= array_pop($state->parents);
throw new TemplateFormatException('Unclosed section {{#'.$block->name().'}}');
}
Expand Down

0 comments on commit 64ba24d

Please sign in to comment.