Skip to content

Commit

Permalink
compatibility with nette/latte v3
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 19, 2019
1 parent 10bf575 commit 0274931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridges/FormsLatte/FormMacros.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function macroForm(MacroNode $node, PhpWriter $writer)
throw new CompileException('Did you mean <form n:name=...> ?');
}
$name = $node->tokenizer->fetchWord();
if ($name === false) {
if ($name == null) { // null or false
throw new CompileException('Missing form name in ' . $node->getNotation());
}
$node->replaced = true;
Expand All @@ -75,7 +75,7 @@ public function macroFormContainer(MacroNode $node, PhpWriter $writer)
throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
}
$name = $node->tokenizer->fetchWord();
if ($name === false) {
if ($name == null) { // null or false
throw new CompileException('Missing name in ' . $node->getNotation());
}
$node->tokenizer->reset();
Expand Down

0 comments on commit 0274931

Please sign in to comment.