aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller/ApiController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Controller/ApiController.php')
-rw-r--r--apps/files/lib/Controller/ApiController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index e9d15018d03..76597b7a018 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -285,13 +285,13 @@ class ApiController extends Controller {
*
* @NoAdminRequired
*
- * @param bool $key
+ * @param string $key
* @param string|bool $value
* @return JSONResponse
*/
public function setConfig(string $key, string|bool $value): JSONResponse {
try {
- $this->userConfig->setConfig($key, $value);
+ $this->userConfig->setConfig($key, (string)$value);
} catch (\InvalidArgumentException $e) {
return new JSONResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}