aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh <josh.t.richards@gmail.com>2024-10-01 14:10:12 -0400
committerGitHub <noreply@github.com>2024-10-01 14:10:12 -0400
commit95f1a7b0beb28ed533ea6ebae8bf26879e105f70 (patch)
treed306899ee0a436c28449e7ed5c6089ca780e0c8f
parentb501c806a08118792ac900350860d78047584b97 (diff)
parent60872a1c4ca3d4636bf99a066e7198fe2d59782d (diff)
downloadnextcloud-server-95f1a7b0beb28ed533ea6ebae8bf26879e105f70.tar.gz
nextcloud-server-95f1a7b0beb28ed533ea6ebae8bf26879e105f70.zip
Merge pull request #48503 from nextcloud/backport/48426/stable30
[stable30] fix(config): Suppress `config.php` fopen error at install time
-rw-r--r--lib/private/Config.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index aa20f627edc..62b4aceaa12 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -186,7 +186,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) {