mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-04-16 03:17:24 +03:00
Update Context.php
If the array contains the given key with a null value, the null value should be returned instead of an empty string.
This commit is contained in:
parent
21b3bf9797
commit
4e2c869d3b
@ -254,7 +254,7 @@ class Context
|
||||
if (($inside !== '0' && empty($inside)) || ($inside == 'this')) {
|
||||
return $variable;
|
||||
} elseif (is_array($variable)) {
|
||||
if (isset($variable[$inside])) {
|
||||
if (isset($variable[$inside]) || array_key_exists($inside, $variable)) {
|
||||
return $variable[$inside];
|
||||
} elseif ($inside == "length") {
|
||||
return count($variable);
|
||||
|
Loading…
Reference in New Issue
Block a user