aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-15 22:54:29 +0200
committerGitHub <noreply@github.com>2024-09-15 22:54:29 +0200
commit95c3012ca9a47ac9110b6d5273f85e880dde119d (patch)
tree9e58ecbaa313e2dc11ccf205207cda220caf1fe3
parent6a46dad143d974ee083b0e496efe381b6238d09f (diff)
parent12afcbb022d232e63d5a959d04dfd20c67e07528 (diff)
downloadnextcloud-server-95c3012ca9a47ac9110b6d5273f85e880dde119d.tar.gz
nextcloud-server-95c3012ca9a47ac9110b6d5273f85e880dde119d.zip
Merge pull request #48033 from nextcloud/backport/48013/stable29
[stable29] 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);
}
}
}