Fix psalm warnings

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-08-19 21:55:13 +02:00
parent 93e671e812
commit 72df65c810
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68
2 changed files with 2 additions and 1 deletions

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,

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'));
}