Skip to content

Commit 02cb168

Browse files
authored
Merge pull request #4268 from nextcloud/backport/4253/stable30
[stable30] Fix errors when extracting content controls
2 parents e24326d + 4765643 commit 02cb168

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Service/TemplateFieldService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function extractFields(Node|int $file): array {
7777
$httpClient = $this->clientService->newClient();
7878

7979
$form = RemoteOptionsService::getDefaultOptions();
80-
$form['query'] = ['limit' => 'content-control'];
80+
$form['query'] = ['filter' => 'contentcontrol'];
8181
$form['multipart'] = [[
8282
'name' => 'data',
8383
'contents' => $file->getStorage()->fopen($file->getInternalPath(), 'r'),
@@ -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)