fix(config): Suppress error at install time

Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
Josh 2024-09-27 17:28:14 -04:00 committed by backportbot[bot]
parent 8e093bd92f
commit 60872a1c4c

View 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) {