From 4765643a11ea049e814d8e9e089928b3c03fcd54 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Fri, 22 Nov 2024 14:53:08 +0100 Subject: [PATCH] fix: Catch unexpected results with no type Signed-off-by: Julius Knorr --- lib/Service/TemplateFieldService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/TemplateFieldService.php b/lib/Service/TemplateFieldService.php index 3219acdfa0..6c6af3475b 100644 --- a/lib/Service/TemplateFieldService.php +++ b/lib/Service/TemplateFieldService.php @@ -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; }