fix for template functions with default values
This commit is contained in:
parent
1d079dabe6
commit
1add1065cf
@ -28,8 +28,12 @@ class SkinContext {
|
||||
continue; // skip $ctx
|
||||
|
||||
$key = $plain_args ? $n-1 : $param->name;
|
||||
if (!$plain_args && !array_key_exists($param->name, $arguments))
|
||||
throw new InvalidArgumentException('argument '.$param->name.' not found');
|
||||
if (!$plain_args && !array_key_exists($param->name, $arguments)) {
|
||||
if (!$param->isDefaultValueAvailable())
|
||||
throw new InvalidArgumentException('argument '.$param->name.' not found');
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_string($arguments[$key]) || $arguments[$key] instanceof SkinString) {
|
||||
if (is_string($arguments[$key]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user