]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(config): Suppress error at install time backport/48426/stable30 48503/head
authorJosh <josh.t.richards@gmail.com>
Fri, 27 Sep 2024 21:28:14 +0000 (17:28 -0400)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 1 Oct 2024 16:24:11 +0000 (16:24 +0000)
Signed-off-by: Josh <josh.t.richards@gmail.com>
lib/private/Config.php

index aa20f627edcdff7eb31623a0e07dbc189cb0caab..62b4aceaa125e29af27a883a9791e4a5499086df 100644 (file)
@@ -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) {