Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus <klaus@jsxc.org>2021-12-27 17:17:07 +0300
committerGitHub <noreply@github.com>2021-12-27 17:17:07 +0300
commit87e08860d240b3db42e6e176746bb17382bd1479 (patch)
tree558c9f9f6b19261be837fad82cddd8a5ee67e63e
parente6c6555cb179dd56c902a7e813c8fd5dafff7a2d (diff)
fix xml ocs response for serializable objectssualko-patch-1
Signed-off-by: sualko <klaus@jsxc.org>
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php
index dbff1b846c1..9b629422ff9 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -144,6 +144,10 @@ abstract class BaseResponse extends Response {
$writer->startElement($k);
$this->toXML($v, $writer);
$writer->endElement();
+ } elseif ($v instanceof \JsonSerializable) {
+ $writer->startElement($k);
+ $this->toXML($v->jsonSerialize(), $writer);
+ $writer->endElement();
} else {
$writer->writeElement($k, $v);
}