Skip to content

Commit

Permalink
fix(BaseResponse): Cast XML element values to string
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Sep 15, 2024
1 parent 6d6baec commit ec7fcce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/AppFramework/OCS/BaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ protected function toXML(array $array, \XMLWriter $writer): void {
$writer->startElement($k);
$this->toXML($v->jsonSerialize(), $writer);
$writer->endElement();
} else if ($v === null) {
$writer->writeElement($k);
} else {
$writer->writeElement($k, $v);
$writer->writeElement($k, (string)$v);
}
}
}
Expand Down

0 comments on commit ec7fcce

Please sign in to comment.