From 98857f8d7a7e8c8ea67c3b68e8d715aa0b964d05 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 4 Feb 2023 20:03:44 +0100 Subject: [PATCH] Add exception if lock wasn't successful --- src/Core/Config/Util/ConfigFileManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Core/Config/Util/ConfigFileManager.php b/src/Core/Config/Util/ConfigFileManager.php index 011dbf0e4..ab3784fd5 100644 --- a/src/Core/Config/Util/ConfigFileManager.php +++ b/src/Core/Config/Util/ConfigFileManager.php @@ -204,6 +204,8 @@ class ConfigFileManager if (!$content) { throw new ConfigFileException(sprintf('Couldn\'t read file %s', $filename)); } + } else { + throw new ConfigFileException(sprintf('Cannot lock file %s', $filename)); } } finally { // unlock and close the stream for every circumstances @@ -319,6 +321,8 @@ class ConfigFileManager !fflush($configStream)) { throw new ConfigFileException(sprintf('Cannot modify locked file %s', $filename)); } + } else { + throw new ConfigFileException(sprintf('Cannot lock file %s', $filename)); } } finally { // unlock and close the stream for every circumstances