Skip to content

Commit d0e0505

Browse files
committed
Latte: {inputError} must have argument
1 parent d3204f2 commit d0e0505

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Bridges/FormsLatte/Nodes/InputErrorNode.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace Nette\Bridges\FormsLatte\Nodes;
1111

12-
use Latte\Compiler\Nodes\Php\Expression\VariableNode;
1312
use Latte\Compiler\Nodes\Php\ExpressionNode;
1413
use Latte\Compiler\Nodes\StatementNode;
1514
use Latte\Compiler\PrintContext;
@@ -27,13 +26,10 @@ class InputErrorNode extends StatementNode
2726
public static function create(Tag $tag): static
2827
{
2928
$tag->outputMode = $tag::OutputKeepIndentation;
29+
$tag->expectArguments();
30+
3031
$node = new static;
31-
if ($tag->parser->isEnd()) {
32-
trigger_error("Missing argument in {inputError} (on line {$tag->position->line})", E_USER_DEPRECATED);
33-
$node->name = new VariableNode('ʟ_input');
34-
} else {
35-
$node->name = $tag->parser->parseUnquotedStringOrExpression();
36-
}
32+
$node->name = $tag->parser->parseUnquotedStringOrExpression();
3733
return $node;
3834
}
3935

0 commit comments

Comments
 (0)