]> git.mxchange.org Git - friendica.git/commitdiff
Add exception if lock wasn't successful
authorPhilipp <admin@philipp.info>
Sat, 4 Feb 2023 19:03:44 +0000 (20:03 +0100)
committerPhilipp <admin@philipp.info>
Fri, 10 Feb 2023 13:06:21 +0000 (14:06 +0100)
src/Core/Config/Util/ConfigFileManager.php

index 011dbf0e48e3f0e3011b09b53c8702d7036f1b37..ab3784fd5c548f0f0cc8d111833b36f429ac686c 100644 (file)
@@ -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