diff --git a/lib/Db/Schema.php b/lib/Db/Schema.php index 314ed55..782f75a 100644 --- a/lib/Db/Schema.php +++ b/lib/Db/Schema.php @@ -87,20 +87,23 @@ public function jsonSerialize(): array $properties[$key] = $property; continue; } - switch ($property['format']) { - case 'string': - // For now array as string - case 'array': - $properties[$key]['default'] = (string) $property; - break; - case 'int': - case 'integer': - case 'number': - $properties[$key]['default'] = (int) $property; - break; - case 'bool': - $properties[$key]['default'] = (bool) $property; - break; + + if (isset($property['format']) === true) { + switch ($property['format']) { + case 'string': + // For now array as string + case 'array': + $properties[$key]['default'] = (string) $property; + break; + case 'int': + case 'integer': + case 'number': + $properties[$key]['default'] = (int) $property; + break; + case 'bool': + $properties[$key]['default'] = (bool) $property; + break; + } } } }