Skip to content

Commit

Permalink
The first element may not have index zero (#3680)
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrydallacroce authored Dec 21, 2021
1 parent ba62f67 commit 5adc4b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/metastore/src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function getAll($schema_id): array {
if (count($data) == 0) {
return TRUE;
}
return $data[0] instanceof RootedJsonData;
return reset($data) instanceof RootedJsonData;
});

}
Expand Down Expand Up @@ -194,7 +194,7 @@ public function getRange(string $schema_id, int $start, int $length):array {
if (count($data) == 0) {
return TRUE;
}
return $data[0] instanceof RootedJsonData;
return reset($data) instanceof RootedJsonData;
});

}
Expand Down

0 comments on commit 5adc4b7

Please sign in to comment.