Skip to content

Commit 95c3012

Browse files
authored
Merge pull request #48033 from nextcloud/backport/48013/stable29
[stable29] fix(BaseResponse): Cast XML element values to string
2 parents 6a46dad + 12afcbb commit 95c3012

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/private/AppFramework/OCS/BaseResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ protected function toXML(array $array, \XMLWriter $writer): void {
163163
$writer->startElement($k);
164164
$this->toXML($v->jsonSerialize(), $writer);
165165
$writer->endElement();
166+
} elseif ($v === null) {
167+
$writer->writeElement($k);
166168
} else {
167-
$writer->writeElement($k, $v);
169+
$writer->writeElement($k, (string)$v);
168170
}
169171
}
170172
}

0 commit comments

Comments
 (0)