mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-04-15 10:57:24 +03:00
allow accessing stuff via 0 index, fixes #30
This commit is contained in:
parent
4f0578c048
commit
a4e56e3f60
@ -244,7 +244,7 @@ class Context
|
||||
private function _findVariableInContext($variable, $inside, $strict = false)
|
||||
{
|
||||
$value = '';
|
||||
if (empty($inside) || ($inside == 'this')) {
|
||||
if (($inside !== '0' && empty($inside)) || ($inside == 'this')) {
|
||||
return $variable;
|
||||
} elseif (is_array($variable)) {
|
||||
if (isset($variable[$inside])) {
|
||||
|
Loading…
Reference in New Issue
Block a user