aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-15 13:07:50 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-15 17:16:41 +0000
commitf92a30301a6ef4dd874df8842c922f26eb578469 (patch)
tree5a8d9ad3ff79e34665703c2d595d3e9166e66cf9 /lib/private
parentb94b0f6b912297e67ef5503b2c2d7b581aea89b9 (diff)
downloadnextcloud-server-f92a30301a6ef4dd874df8842c922f26eb578469.tar.gz
nextcloud-server-f92a30301a6ef4dd874df8842c922f26eb578469.zip
fix(BaseResponse): Cast XML element values to stringbackport/48013/stable28
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private')
-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 78bcc5586d3..4f460795e7f 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -163,8 +163,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);
}
}
}