mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 10:16:41 +03:00
Add this (for current variable in context) fix #5
Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
This commit is contained in:
parent
c735de8e5b
commit
3d8685f179
@ -130,7 +130,7 @@ class Handlebars_Context
|
|||||||
throw new InvalidArgumentException('can not find variable in context');
|
throw new InvalidArgumentException('can not find variable in context');
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
} elseif ($variableName == '.') {
|
} elseif ($variableName == '.' || $variableName == 'this') {
|
||||||
return $current;
|
return $current;
|
||||||
} else {
|
} else {
|
||||||
$chunks = explode('.', $variableName);
|
$chunks = explode('.', $variableName);
|
||||||
@ -174,4 +174,4 @@ class Handlebars_Context
|
|||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user