Skip to content

Commit 4765643

Browse files
juliusknorrbackportbot[bot]
authored andcommitted
fix: Catch unexpected results with no type
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent 16baec7 commit 4765643

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Service/TemplateFieldService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function extractFields(Node|int $file): array {
9393
$fields = [];
9494

9595
foreach ($documentStructure as $index => $attr) {
96-
$fieldType = FieldType::tryFrom($attr['type']) ?? null;
96+
$fieldType = FieldType::tryFrom($attr['type'] ?? '') ?? null;
9797
if ($fieldType === null) {
9898
continue;
9999
}

0 commit comments

Comments
 (0)