aboutsummaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/lib/Notification
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 /apps/updatenotification/lib/Notification
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 'apps/updatenotification/lib/Notification')
-rw-r--r--apps/updatenotification/lib/Notification/BackgroundJob.php6
-rw-r--r--apps/updatenotification/lib/Notification/Notifier.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php
index c1b3cddf945..f8f1f41e589 100644
--- a/apps/updatenotification/lib/Notification/BackgroundJob.php
+++ b/apps/updatenotification/lib/Notification/BackgroundJob.php
@@ -108,14 +108,14 @@ class BackgroundJob extends TimedJob {
$status = $updater->check();
if ($status === false) {
- $errors = 1 + (int) $this->config->getAppValue('updatenotification', 'update_check_errors', 0);
- $this->config->setAppValue('updatenotification', 'update_check_errors', $errors);
+ $errors = 1 + (int) $this->config->getAppValue('updatenotification', 'update_check_errors', '0');
+ $this->config->setAppValue('updatenotification', 'update_check_errors', (string)$errors);
if (\in_array($errors, $this->connectionNotifications, true)) {
$this->sendErrorNotifications($errors);
}
} elseif (\is_array($status)) {
- $this->config->setAppValue('updatenotification', 'update_check_errors', 0);
+ $this->config->setAppValue('updatenotification', 'update_check_errors', '0');
$this->clearErrorNotifications();
if (isset($status['version'])) {
diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php
index c1269daaa30..9ce233ed721 100644
--- a/apps/updatenotification/lib/Notification/Notifier.php
+++ b/apps/updatenotification/lib/Notification/Notifier.php
@@ -115,7 +115,7 @@ class Notifier implements INotifier {
$l = $this->l10NFactory->get('updatenotification', $languageCode);
if ($notification->getSubject() === 'connection_error') {
- $errors = (int) $this->config->getAppValue('updatenotification', 'update_check_errors', 0);
+ $errors = (int) $this->config->getAppValue('updatenotification', 'update_check_errors', '0');
if ($errors === 0) {
$this->notificationManager->markProcessed($notification);
throw new \InvalidArgumentException('Update checked worked again');