Skip to content

Commit da8ef3c

Browse files
Merge pull request #48502 from nextcloud/backport/48426/stable29
[stable29] fix(config): Suppress `config.php` fopen error at install time
2 parents a15a378 + 82319d4 commit da8ef3c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/private/Config.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ private function readData() {
217217
@opcache_invalidate($file, false);
218218
}
219219

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

0 commit comments

Comments
 (0)