mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Do not empty config.php file if reading failed for any reason
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
2c08e6f080
commit
c2dafb0997
1 changed files with 4 additions and 0 deletions
|
|
@ -262,6 +262,10 @@ class Config {
|
|||
private function writeData() {
|
||||
$this->checkReadOnly();
|
||||
|
||||
if (!is_file(\OC::$configDir.'/CAN_INSTALL') && !isset($this->cache['version'])) {
|
||||
throw new HintException(sprintf('Configuration was not read or initialized correctly, not overwriting %s', $this->configFilePath));
|
||||
}
|
||||
|
||||
// Create a php file ...
|
||||
$content = "<?php\n";
|
||||
$content .= '$CONFIG = ';
|
||||
|
|
|
|||
Loading…
Reference in a new issue