diff --git a/src/Fenom.php b/src/Fenom.php index 1e94bce..2663475 100644 --- a/src/Fenom.php +++ b/src/Fenom.php @@ -323,7 +323,7 @@ class Fenom * * @param string|Fenom\ProviderInterface $source path to templates or custom provider * @param string $compile_dir path to compiled files - * @param int $options + * @param int|array $options * @throws InvalidArgumentException * @return Fenom */ diff --git a/src/Fenom/Template.php b/src/Fenom/Template.php index edff568..fc42003 100644 --- a/src/Fenom/Template.php +++ b/src/Fenom/Template.php @@ -1313,7 +1313,7 @@ class Template extends Render $_arr .= $this->parseArray($tokens); $key = false; $val = true; - } elseif ($tokens->is(']') && !$key) { + } elseif ($tokens->is(']') && (!$key || $tokens->prev[0] === ',')) { $tokens->next(); return $_arr . ')'; } else {