{"record":{"id":"dbad3dc6e9e67397","repo":"nextcloud/all-in-one","slug":"the-daily-backup-time-must-not-be-empty","errorCode":null,"errorMessage":"The daily backup time must not be empty!","messagePattern":"The daily backup time must not be empty!","errorType":"validation","errorClass":"InvalidSettingConfigurationException","httpStatus":422,"severity":"warning","filePath":"php/src/Data/ConfigurationManager.php","lineNumber":904,"sourceCode":"        }\n\n        return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));\n    }\n\n    public function getCollaboraSeccompPolicy() : string {\n        $defaultString = '--o:security.seccomp=';\n        if (!$this->collaboraSeccompDisabled) {\n            return $defaultString . 'true';\n        }\n        return $defaultString . 'false';\n    }\n\n    /**\n     * @throws InvalidSettingConfigurationException\n     */\n    public function setDailyBackupTime(string $time, bool $enableAutomaticUpdates, bool $successNotification) : void {\n        if ($time === \"\") {\n            throw new InvalidSettingConfigurationException(\"The daily backup time must not be empty!\");\n        }\n\n        if (!preg_match(\"#^[0-1][0-9]:[0-5][0-9]$#\", $time) && !preg_match(\"#^2[0-3]:[0-5][0-9]$#\", $time)) {\n            throw new InvalidSettingConfigurationException(\"You did not enter a correct time! One correct example is '04:00'!\");\n        }\n\n        if ($enableAutomaticUpdates === false) {\n            $time .= PHP_EOL . 'automaticUpdatesAreNotEnabled';\n        } else {\n            $time .= PHP_EOL;\n        }\n        if ($successNotification === false) {\n            $time .= PHP_EOL . 'successNotificationsAreNotEnabled';\n        } else {\n            $time .= PHP_EOL;\n        }\n        file_put_contents(DataConst::GetDailyBackupTimeFile(), $time);\n        $this->dailyBackupFileCache = '';","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/nextcloud/all-in-one/blob/6b788eec5e61733cf03ed380a3572e43ae3f11ce/php/src/Data/ConfigurationManager.php#L886-L922","documentation":"Thrown by ConfigurationManager::setDailyBackupTime when the time string is empty. The method is invoked from the web UI form (daily_backup_time field) and writes the chosen time plus flags for automatic updates and success notifications into the daily backup time file; an empty value would disable the schedule silently, so it is rejected.","triggerScenarios":"POST to the web configuration endpoint with 'daily_backup_time' present but '' (the controller only routes the field into setDailyBackupTime when the key exists in the parsed body).","commonSituations":"Curl/automation omitting the time value while sending the key; a cleared input still being serialized by the form; JS sending the empty string after the picker failed to initialize.","solutions":["Send a valid HH:MM string such as '04:00' in the daily_backup_time field.","Use the dedicated delete path (delete_daily_backup_time) when the intent is to remove the schedule instead of setting it.","Ensure your client is not sending the key with an empty value when you do not intend to change the backup time."],"exampleFix":"// before\ncurl -d 'daily_backup_time=' https://host/api/webconfig\n\n// after\ncurl -d 'daily_backup_time=04:00' https://host/api/webconfig","handlingStrategy":"validation","validationCode":"if ($dailyBackupTime === '') {\n    // use delete_daily_backup_time action or block the request\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only send daily_backup_time when a real time is chosen.","Use the dedicated delete action to unset the schedule."],"tags":["php","nextcloud-aio","input-validation","backup","scheduling"],"backgroundTag":"required-field-empty","analyzedSha":"6b788eec5e61733cf03ed380a3572e43ae3f11ce","analyzedAt":"2026-08-21T05:47:24.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}