aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-15 22:12:39 +0200
committerGitHub <noreply@github.com>2024-09-15 22:12:39 +0200
commitf20bef0eeca85eadc81cdf9aebfcac9b07988656 (patch)
tree0816573664bc9c864c7853057ff37795e83cf99b
parentd3e41d3c460d5deca1cd16c16d6fe1499e83118a (diff)
parentf92a30301a6ef4dd874df8842c922f26eb578469 (diff)
downloadnextcloud-server-f20bef0eeca85eadc81cdf9aebfcac9b07988656.tar.gz
nextcloud-server-f20bef0eeca85eadc81cdf9aebfcac9b07988656.zip
Merge pull request #48032 from nextcloud/backport/48013/stable28
[stable28] fix(BaseResponse): Cast XML element values to string
-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);
}
}
}