aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/OCS/V1Response.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/OCS/V1Response.php')
-rw-r--r--lib/private/AppFramework/OCS/V1Response.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/AppFramework/OCS/V1Response.php b/lib/private/AppFramework/OCS/V1Response.php
index f4f19832fa8..8c402809cc4 100644
--- a/lib/private/AppFramework/OCS/V1Response.php
+++ b/lib/private/AppFramework/OCS/V1Response.php
@@ -68,13 +68,12 @@ class V1Response extends BaseResponse {
public function render() {
$meta = [
'status' => $this->getOCSStatus() === 100 ? 'ok' : 'failure',
- 'statuscode' => $this->getOCSStatus(),
- 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage,
+ 'statuscode' => (string)$this->getOCSStatus(),
+ 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage ?? '',
+ 'totalitems' => (string)($this->itemsCount ?? ''),
+ 'itemsperpage' => (string)($this->itemsPerPage ?? ''),
];
- $meta['totalitems'] = $this->itemsCount !== null ? (string)$this->itemsCount : '';
- $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string)$this->itemsPerPage: '';
-
return $this->renderResult($meta);
}
}