Skip to content

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Oct 10, 2024
1 parent 8818759 commit d20e021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Inspector/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function getValuesByType(TypeInterface $type): \Generator
{
if ($type instanceof StructDefinitionType) {
yield 'struct';
foreach ($type->getProperties() as $name => $value) {
foreach ($type->getProperties() ?? [] as $name => $value) {
yield $name;
yield from $this->getValuesByType($value);
}
Expand Down

0 comments on commit d20e021

Please sign in to comment.