From 5c1dfb9ffd9ca0caaa0a7ac416061964d1bba318 Mon Sep 17 00:00:00 2001 From: Vaalyn Date: Mon, 17 Jun 2019 17:11:40 +0200 Subject: [PATCH] Fix bug due to type mismatch and fix variable naming --- src/Sync/Task/Backup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sync/Task/Backup.php b/src/Sync/Task/Backup.php index 9ca5b32ed..875ca1d95 100644 --- a/src/Sync/Task/Backup.php +++ b/src/Sync/Task/Backup.php @@ -90,8 +90,8 @@ class Backup extends AbstractTask */ public function run($force = false): void { - $logging_enabled = (bool)$this->settings_repo->getSetting(Entity\Settings::BACKUP_ENABLED, 0); - if (!$logging_enabled) { + $backup_enabled = (bool)$this->settings_repo->getSetting(Entity\Settings::BACKUP_ENABLED, 0); + if (!$backup_enabled) { $this->logger->debug('Automated backups disabled; skipping...'); return; } @@ -105,7 +105,7 @@ class Backup extends AbstractTask // Check if the backup time matches (if it's set). $backup_timecode = (int)$this->settings_repo->getSetting(Entity\Settings::BACKUP_TIME); if (0 !== $backup_timecode) { - $current_timecode = $now_utc->format('Hi'); + $current_timecode = (int)$now_utc->format('Hi'); if ($backup_timecode !== $current_timecode) { return;