Skip to content

Commit 59a7e4a

Browse files
committed
fixed: get_from_array helper when map value null
1 parent e8be38f commit 59a7e4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

helpers/presento.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function get_from_array($map, string $node)
4343
$terminate = false;
4444
$path = explode('.', $node);
4545
foreach ($path as $val) {
46+
if (!is_array($map)) return $map;
47+
4648
if (!array_key_exists($val, $map)) {
4749
$terminate = true;
4850
break;

0 commit comments

Comments
 (0)