mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Merge pull request #81 from dakiesse/fix
Addition to the docs and fix last ',' in array
This commit is contained in:
commit
ec6c5d3fef
@ -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
|
||||
*/
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user