diff --git a/src/bind.inc.php b/src/bind.inc.php index c3f0f67..1ab65c7 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -205,7 +205,7 @@ function add_twig_support(\Twig\Environment $twig) if($arg->hasToken('default')) ++$def_args_num; else if($def_args_num > 0) - throw new Exception("Field '{$name}' in {$fn->getName()} is expected to be tagged with @default"); + throw new Exception("Field '{$arg->getName()}' in {$fn->getName()} is expected to be tagged with @default"); } return $def_args_num; }