Add test for Addon failures

This commit is contained in:
Philipp 2023-01-08 02:28:27 +01:00
parent 0429a4e429
commit 2293ff6206
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
3 changed files with 42 additions and 3 deletions

View file

@ -194,11 +194,13 @@ class ConfigFileManager
try {
if (flock($configStream, LOCK_SH)) {
clearstatcache(true, $filename);
if (($filesize = filesize($filename)) === 0) {
return;
}
$content = fread($configStream, filesize($filename));
$content = fread($configStream, $filesize);
if (!$content) {
throw new ConfigFileException(sprintf('Couldn\'t read file %s', $filename));
}