Assert that the element exists

This commit is contained in:
Sebastian Bergmann 2025-03-17 17:14:17 +01:00
parent 515a304e30
commit a3bb1f01c1
No known key found for this signature in database
GPG Key ID: 4AA394086372C20A
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ final readonly class Exporter
}
if (is_array($value)) {
assert(is_array($data[$key]) || is_object($data[$key]));
assert(isset($data[$key]) && (is_array($data[$key]) || is_object($data[$key])));
if ($processed->contains($data[$key]) !== false) {
$result[] = '*RECURSION*';