mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Merge pull request #34025 from nextcloud/backport/34021/stable23
[stable23] Do not empty config.php file if reading failed for any reason
This commit is contained in:
commit
c11682d0c7
1 changed files with 4 additions and 0 deletions
|
|
@ -239,6 +239,10 @@ class Config {
|
|||
* @throws \Exception If no file lock can be acquired
|
||||
*/
|
||||
private function writeData() {
|
||||
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