mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Update Context.php
Should return null instead of an empty string when context is not found. Handlebars.js returns undefined, which makes it possible to distict an empty string and not existing. (should not affect existing use, because null is handeled the same way as empty string)
This commit is contained in:
parent
c6f3e0fd5e
commit
122a8a9d7b
@ -253,7 +253,7 @@ class Context
|
||||
*/
|
||||
private function _findVariableInContext($variable, $inside, $strict = false)
|
||||
{
|
||||
$value = '';
|
||||
$value = null;
|
||||
if (($inside !== '0' && empty($inside)) || ($inside == 'this')) {
|
||||
return $variable;
|
||||
} elseif (is_array($variable)) {
|
||||
|
Loading…
Reference in New Issue
Block a user