mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
proper fix for array params (now works with both positional and named params), tests
This commit is contained in:
@@ -644,7 +644,11 @@ class Template extends Render {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
} elseif($tokens->is('[')) {
|
||||
$_exp .= $this->parseArray($tokens);
|
||||
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1126,11 +1130,7 @@ class Template extends Render {
|
||||
}
|
||||
if($tokens->is("=")) {
|
||||
$tokens->next();
|
||||
if ($tokens->is('[')) {
|
||||
$params[ $key ] = $this->parseArray($tokens);
|
||||
} else {
|
||||
$params[ $key ] = $this->parseExp($tokens);
|
||||
}
|
||||
$params[ $key ] = $this->parseExp($tokens);
|
||||
} else {
|
||||
$params[ $key ] = 'true';
|
||||
}
|
||||
|
Reference in New Issue
Block a user