diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php index 5adb9738beb..671a8b51501 100644 --- a/backup/util/helper/backup_cron_helper.class.php +++ b/backup/util/helper/backup_cron_helper.class.php @@ -403,7 +403,7 @@ abstract class backup_cron_automated_helper { $bc->log('No directory specified for automated backups', backup::LOG_WARNING); $outcome = self::BACKUP_STATUS_WARNING; - } else if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir) && $storage !== 0) { + } else if ($storage !== 0 && (!file_exists($dir) || !is_dir($dir) || !is_writable($dir))) { // If we need to copy the backup file to an external dir and it is not writable, change status to error. $bc->log('Specified backup directory is not writable - ', backup::LOG_ERROR, $dir);