mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-06-10 02:15:45 +02:00
Handle unset keys
This commit is contained in:
parent
c32080c344
commit
f08fff6f54
@ -90,7 +90,9 @@ class Tree implements IteratorAggregate
|
||||
*/
|
||||
public function inObject(): bool
|
||||
{
|
||||
return is_string($this->original[$this->depth]);
|
||||
$key = $this->original[$this->depth] ?? null;
|
||||
|
||||
return is_string($key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user