aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-15 13:07:50 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-15 15:37:27 +0200
commit3d9b49815b15560e351cbbba1054d68f4ba5eb35 (patch)
tree6d9f92949bedc423c0d1be654e9fc96224e2a81d
parent6d6baec54f3ebaf3d3917a58aa5281a7a21e738b (diff)
downloadnextcloud-server-3d9b49815b15560e351cbbba1054d68f4ba5eb35.tar.gz
nextcloud-server-3d9b49815b15560e351cbbba1054d68f4ba5eb35.zip
fix(BaseResponse): Cast XML element values to stringfix/baseresponse/xml-element-value-string-cast
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php
index d367574a179..3b0a28fe89c 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -143,8 +143,10 @@ abstract class BaseResponse extends Response {
$writer->startElement($k);
$this->toXML($v->jsonSerialize(), $writer);
$writer->endElement();
+ } elseif ($v === null) {
+ $writer->writeElement($k);
} else {
- $writer->writeElement($k, $v);
+ $writer->writeElement($k, (string)$v);
}
}
}