mirror of
https://github.com/friendica/friendica
synced 2025-04-26 10:30:11 +00:00
Add test for Addon failures
This commit is contained in:
parent
0429a4e429
commit
2293ff6206
3 changed files with 42 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ class Cache
|
|||
$keys = array_keys($config[$category]);
|
||||
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($this->config[$category][$key])) {
|
||||
if (!key_exists($key, $this->config[$category] ?? [])) {
|
||||
$return[$category][$key] = $config[$category][$key];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue