Skip to content

Commit

Permalink
Merge pull request #48032 from nextcloud/backport/48013/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(BaseResponse): Cast XML element values to string
  • Loading branch information
skjnldsv authored Sep 15, 2024
2 parents d3e41d3 + f92a303 commit f20bef0
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 @@ -163,8 +163,10 @@ protected function toXML(array $array, \XMLWriter $writer): void {
$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);
}
}
}
Expand Down

0 comments on commit f20bef0

Please sign in to comment.