allow accessing stuff via 0 index, fixes #30

This commit is contained in:
behrooz shabani (everplays) 2013-11-19 18:18:32 +03:30
parent 4f0578c048
commit a4e56e3f60

View File

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