Merge pull request #1666 from Vaalyn/fix_issue_1637

Fixes automatic backup not running
This commit is contained in:
Buster "Silver Eagle" Neece 2019-06-17 20:13:35 -05:00 committed by GitHub
commit a4a2a2aa0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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;