Merge pull request #48502 from nextcloud/backport/48426/stable29

[stable29] fix(config): Suppress `config.php` fopen error at install time
This commit is contained in:
Josh 2024-10-01 14:11:23 -04:00 committed by GitHub
commit da8ef3c9ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,7 +217,8 @@ class Config {
@opcache_invalidate($file, false);
}
$filePointer = @fopen($file, 'r');
// suppressor doesn't work here at boot time since it'll go via our onError custom error handler
$filePointer = file_exists($file) ? @fopen($file, 'r') : false;
if ($filePointer === false) {
// e.g. wrong permissions are set
if ($file === $this->configFilePath) {