mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Merge pull request #79 from ulriklystbaek/patch-5
Update Context.php, Return null instead of empty string when the variable is not available in context
This commit is contained in:
commit
8a669f3176
@ -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