From c757981f6cbfe392dfb67260ba9ae17251fe1c9b Mon Sep 17 00:00:00 2001 From: Barry Brands Date: Fri, 17 Jan 2025 13:36:38 +0100 Subject: [PATCH] Check isset type --- lib/Db/Schema.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Db/Schema.php b/lib/Db/Schema.php index 0353aee0be..93681bd9c1 100644 --- a/lib/Db/Schema.php +++ b/lib/Db/Schema.php @@ -136,6 +136,10 @@ public function getSchemaObject(IURLGenerator $urlGenerator): object // Remove empty fields with array_filter(). $data['properties'][$title] = array_filter($property); + if (isset($property['type']) === false) { + continue; + } + if ($property['type'] === 'file') { $data['properties'][$title] = ['$ref' => $urlGenerator->getBaseUrl().'/apps/openregister/api/files/schema']; }