Skip to content

Commit

Permalink
fixed: get_from_array helper when map value null
Browse files Browse the repository at this point in the history
  • Loading branch information
nahid committed Oct 17, 2019
1 parent e8be38f commit 59a7e4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpers/presento.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ function get_from_array($map, string $node)
$terminate = false;
$path = explode('.', $node);
foreach ($path as $val) {
if (!is_array($map)) return $map;

if (!array_key_exists($val, $map)) {
$terminate = true;
break;
Expand Down

0 comments on commit 59a7e4a

Please sign in to comment.