From f92a30301a6ef4dd874df8842c922f26eb578469 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sun, 15 Sep 2024 13:07:50 +0200 Subject: fix(BaseResponse): Cast XML element values to string Signed-off-by: provokateurin --- lib/private/AppFramework/OCS/BaseResponse.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } } -- cgit v1.2.3