Skip to content

Commit

Permalink
fix: Catch unexpected results with no type
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Nov 25, 2024
1 parent 16baec7 commit 4765643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/TemplateFieldService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function extractFields(Node|int $file): array {
$fields = [];

foreach ($documentStructure as $index => $attr) {
$fieldType = FieldType::tryFrom($attr['type']) ?? null;
$fieldType = FieldType::tryFrom($attr['type'] ?? '') ?? null;
if ($fieldType === null) {
continue;
}
Expand Down

0 comments on commit 4765643

Please sign in to comment.