Skip to content

Commit 3e535a4

Browse files
committed
compatibility with nette/latte v3
1 parent 310b72f commit 3e535a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bridges/FormsLatte/FormMacros.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function macroForm(MacroNode $node, PhpWriter $writer)
5454
throw new CompileException('Did you mean <form n:name=...> ?');
5555
}
5656
$name = $node->tokenizer->fetchWord();
57-
if ($name === false) {
57+
if ($name == null) { // null or false
5858
throw new CompileException('Missing form name in ' . $node->getNotation());
5959
}
6060
$node->replaced = true;
@@ -77,7 +77,7 @@ public function macroFormContainer(MacroNode $node, PhpWriter $writer)
7777
throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
7878
}
7979
$name = $node->tokenizer->fetchWord();
80-
if ($name === false) {
80+
if ($name == null) { // null or false
8181
throw new CompileException('Missing name in ' . $node->getNotation());
8282
}
8383
$node->tokenizer->reset();

0 commit comments

Comments
 (0)