aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-03-31 08:53:56 +0200
committerjld3103 <jld3103yt@gmail.com>2023-04-05 09:08:56 +0200
commitd9f85220038b2421870a36f9b6a860d6444a988a (patch)
tree10b8cbdb0c0ded7947b50654a4e1d4a30390768a /lib
parent54140dd6bfda81276bd889a9a141d51e328100d1 (diff)
downloadnextcloud-server-d9f85220038b2421870a36f9b6a860d6444a988a.tar.gz
nextcloud-server-d9f85220038b2421870a36f9b6a860d6444a988a.zip
Fix types for reading and writing config values
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php4
-rw-r--r--lib/private/Setup.php4
-rw-r--r--lib/private/Share20/Manager.php2
-rw-r--r--lib/private/Updater/VersionCheck.php4
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index d62556465df..7e115cf9b42 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -280,7 +280,7 @@ class Manager {
$sessionId = $this->session->getId();
$token = $this->tokenProvider->getToken($sessionId);
$tokenId = $token->getId();
- $this->config->deleteUserValue($user->getUID(), 'login_token_2fa', $tokenId);
+ $this->config->deleteUserValue($user->getUID(), 'login_token_2fa', (string)$tokenId);
$dispatchEvent = new GenericEvent($user, ['provider' => $provider->getDisplayName()]);
$this->legacyDispatcher->dispatch(IProvider::EVENT_SUCCESS, $dispatchEvent);
@@ -395,7 +395,7 @@ class Manager {
$id = $this->session->getId();
$token = $this->tokenProvider->getToken($id);
- $this->config->setUserValue($user->getUID(), 'login_token_2fa', (string) $token->getId(), $this->timeFactory->getTime());
+ $this->config->setUserValue($user->getUID(), 'login_token_2fa', (string) $token->getId(), (string)$this->timeFactory->getTime());
}
public function clearTwoFactorPending(string $userId) {
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index dc59eacbf57..e8371ba8542 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -391,8 +391,8 @@ class Setup {
if (empty($error)) {
$config = \OC::$server->getConfig();
- $config->setAppValue('core', 'installedat', microtime(true));
- $config->setAppValue('core', 'lastupdatedat', microtime(true));
+ $config->setAppValue('core', 'installedat', (string)microtime(true));
+ $config->setAppValue('core', 'lastupdatedat', (string)microtime(true));
$vendorData = $this->getVendorData();
$config->setAppValue('core', 'vendor', $vendorData['vendor']);
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 1661b1d6a61..26e5549ccff 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -494,7 +494,7 @@ class Manager implements IManager {
$expirationDate = new \DateTime();
$expirationDate->setTime(0, 0, 0);
- $days = (int)$this->config->getAppValue('core', 'link_defaultExpDays', $this->shareApiLinkDefaultExpireDays());
+ $days = (int)$this->config->getAppValue('core', 'link_defaultExpDays', (string)$this->shareApiLinkDefaultExpireDays());
if ($days > $this->shareApiLinkDefaultExpireDays()) {
$days = $this->shareApiLinkDefaultExpireDays();
}
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index 3abbae682b5..156d1c2e02f 100644
--- a/lib/private/Updater/VersionCheck.php
+++ b/lib/private/Updater/VersionCheck.php
@@ -66,10 +66,10 @@ class VersionCheck {
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/updater_server/');
- $this->config->setAppValue('core', 'lastupdatedat', time());
+ $this->config->setAppValue('core', 'lastupdatedat', (string)time());
if ($this->config->getAppValue('core', 'installedat', '') === '') {
- $this->config->setAppValue('core', 'installedat', microtime(true));
+ $this->config->setAppValue('core', 'installedat', (string)microtime(true));
}
$version = Util::getVersion();