mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-03 10:33:08 +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)
|
private function _findVariableInContext($variable, $inside, $strict = false)
|
||||||
{
|
{
|
||||||
$value = '';
|
$value = '';
|
||||||
if (empty($inside) || ($inside == 'this')) {
|
if (($inside !== '0' && empty($inside)) || ($inside == 'this')) {
|
||||||
return $variable;
|
return $variable;
|
||||||
} elseif (is_array($variable)) {
|
} elseif (is_array($variable)) {
|
||||||
if (isset($variable[$inside])) {
|
if (isset($variable[$inside])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user