Skip to content

Commit

Permalink
Merge pull request #48503 from nextcloud/backport/48426/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(config): Suppress `config.php` fopen error at install time
  • Loading branch information
joshtrichards authored Oct 1, 2024
2 parents b501c80 + 60872a1 commit 95f1a7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ private function readData() {
@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) {
Expand Down

0 comments on commit 95f1a7b

Please sign in to comment.