summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-11-07 14:32:23 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-02 15:05:18 +0100
commite4a780127d8b3c7f3a470457157cb8b84b333e99 (patch)
tree5bb7bf46bae6f0a7459d8590d0fdd8627972204f /lib/private/legacy
parenta372564850cb2f8813c4c3cca67bd1b6cfcdb882 (diff)
downloadnextcloud-server-e4a780127d8b3c7f3a470457157cb8b84b333e99.tar.gz
nextcloud-server-e4a780127d8b3c7f3a470457157cb8b84b333e99.zip
Small fix in OC_API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_API.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php
index 9e9c28e2dba..46ee3495572 100644
--- a/lib/private/legacy/OC_API.php
+++ b/lib/private/legacy/OC_API.php
@@ -98,13 +98,10 @@ class OC_API {
}
}
- /**
- * @return string
- */
- public static function requestedFormat() {
+ public static function requestedFormat(): string {
$formats = ['json', 'xml'];
- $format = !empty($_GET['format']) && in_array($_GET['format'], $formats) ? $_GET['format'] : 'xml';
+ $format = (isset($_GET['format']) && in_array($_GET['format'], $formats)) ? $_GET['format'] : 'xml';
return $format;
}