]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix psalm warnings 22214/head
authorMorris Jobke <hey@morrisjobke.de>
Wed, 19 Aug 2020 19:55:13 +0000 (21:55 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 19 Aug 2020 19:55:13 +0000 (21:55 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/dashboard/lib/Controller/DashboardController.php
apps/dashboard/lib/Service/BackgroundService.php

index 5d9f886f0c17adcc188cc7157765b86098cb43d2..40ed026b82b6efe3d88703d0b0cba99d92defa6a 100644 (file)
@@ -152,7 +152,7 @@ class DashboardController extends Controller {
                        return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR);
                }
                $currentVersion++;
-               $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', $currentVersion);
+               $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion);
                return new JSONResponse([
                        'type' => $type,
                        'value' => $value,
index 7fbe1843e71f51743d58cd6dac33901beceffa76..605f953d15b804eb4e69632c7c41f72766e28bc2 100644 (file)
@@ -141,6 +141,7 @@ class BackgroundService {
         */
        public function setFileBackground($path): void {
                $this->config->setUserValue($this->userId, 'dashboard', 'background', 'custom');
+               /** @var \OCP\Files\File $file */
                $file = $this->userFolder->get($path);
                $this->dashboardUserFolder->newFile('background.jpg', $file->fopen('r'));
        }