mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
Add exception if lock wasn't successful
This commit is contained in:
parent
ffa44b8dc0
commit
98857f8d7a
1 changed files with 4 additions and 0 deletions
|
@ -204,6 +204,8 @@ class ConfigFileManager
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
throw new ConfigFileException(sprintf('Couldn\'t read file %s', $filename));
|
throw new ConfigFileException(sprintf('Couldn\'t read file %s', $filename));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw new ConfigFileException(sprintf('Cannot lock file %s', $filename));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// unlock and close the stream for every circumstances
|
// unlock and close the stream for every circumstances
|
||||||
|
@ -319,6 +321,8 @@ class ConfigFileManager
|
||||||
!fflush($configStream)) {
|
!fflush($configStream)) {
|
||||||
throw new ConfigFileException(sprintf('Cannot modify locked file %s', $filename));
|
throw new ConfigFileException(sprintf('Cannot modify locked file %s', $filename));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw new ConfigFileException(sprintf('Cannot lock file %s', $filename));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// unlock and close the stream for every circumstances
|
// unlock and close the stream for every circumstances
|
||||||
|
|
Loading…
Reference in a new issue