Skip to content

Commit

Permalink
Fix fatal error when root is null in has() method
Browse files Browse the repository at this point in the history
  • Loading branch information
omniError committed Mar 10, 2023
1 parent 8e1c07f commit 0d2fe9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function has($key)

// nested case
foreach ($segments as $segment) {
if (array_key_exists($segment, $root)) {
if (is_array($root) && array_key_exists($segment, $root)) {
$root = $root[$segment];
continue;
} else {
Expand Down

0 comments on commit 0d2fe9a

Please sign in to comment.