Browse Source

Fix psalm warnings

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v20.0.0beta1
Morris Jobke 3 years ago
parent
commit
72df65c810
No account linked to committer's email address

+ 1
- 1
apps/dashboard/lib/Controller/DashboardController.php View 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,

+ 1
- 0
apps/dashboard/lib/Service/BackgroundService.php View 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'));
}

Loading…
Cancel
Save