mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-04-17 19:57:24 +03:00
Merge pull request #11 from daviddeutsch/patch-1
Support recursive object traversal (this.property)
This commit is contained in:
commit
63cd738e64
@ -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