Merge pull request #81 from dakiesse/fix

Addition to the docs and fix last ',' in array
This commit is contained in:
Ivan Shalganov 2014-06-24 10:15:31 +04:00
commit ec6c5d3fef
2 changed files with 2 additions and 2 deletions

View File

@ -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
*/

View File

@ -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 {