diff --git a/src/Bridges/FormsLatte/Nodes/InputErrorNode.php b/src/Bridges/FormsLatte/Nodes/InputErrorNode.php index ba2767a61..014e16d69 100644 --- a/src/Bridges/FormsLatte/Nodes/InputErrorNode.php +++ b/src/Bridges/FormsLatte/Nodes/InputErrorNode.php @@ -9,7 +9,6 @@ namespace Nette\Bridges\FormsLatte\Nodes; -use Latte\Compiler\Nodes\Php\Expression\VariableNode; use Latte\Compiler\Nodes\Php\ExpressionNode; use Latte\Compiler\Nodes\StatementNode; use Latte\Compiler\PrintContext; @@ -27,13 +26,10 @@ class InputErrorNode extends StatementNode public static function create(Tag $tag): static { $tag->outputMode = $tag::OutputKeepIndentation; + $tag->expectArguments(); + $node = new static; - if ($tag->parser->isEnd()) { - trigger_error("Missing argument in {inputError} (on line {$tag->position->line})", E_USER_DEPRECATED); - $node->name = new VariableNode('ʟ_input'); - } else { - $node->name = $tag->parser->parseUnquotedStringOrExpression(); - } + $node->name = $tag->parser->parseUnquotedStringOrExpression(); return $node; }