mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Support recursive object traversal
Nested this.property traversal wasn't possible. With this fix, it is.
This commit is contained in:
parent
e6b4182a75
commit
0451fa2483
@ -157,7 +157,9 @@ class Handlebars_Context
|
||||
private function _findVariableInContext($variable, $inside, $strict = false)
|
||||
{
|
||||
$value = '';
|
||||
if (is_array($variable)) {
|
||||
if ( empty( $inside ) || ( $inside == 'this' ) ) {
|
||||
return $variable;
|
||||
} elseif (is_array($variable)) {
|
||||
if (isset($variable[$inside])) {
|
||||
$value = $variable[$inside];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user