Fix crash last ',' in array

This commit is contained in:
Danil Chekalin 2014-06-19 23:49:00 +07:00
parent 76e90e8404
commit 674dd2d909

View File

@ -1313,7 +1313,7 @@ class Template extends Render
$_arr .= $this->parseArray($tokens); $_arr .= $this->parseArray($tokens);
$key = false; $key = false;
$val = true; $val = true;
} elseif ($tokens->is(']') && !$key) { } elseif ($tokens->is(']') && (!$key || $tokens->prev[0] === ',')) {
$tokens->next(); $tokens->next();
return $_arr . ')'; return $_arr . ')';
} else { } else {