mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-04-01 09:10:08 +02:00
🐛 Configuration files are reloaded gracefully
This commit is contained in:
@@ -133,8 +133,11 @@ class PhpConfigurationFile: CreatedFromFile {
|
||||
}
|
||||
|
||||
public func reload() {
|
||||
let newLines = try! String(contentsOfFile: self.filePath)
|
||||
.components(separatedBy: "\n")
|
||||
guard let newLines = try? String(contentsOfFile: self.filePath)
|
||||
.components(separatedBy: "\n") else {
|
||||
Log.warn("Could not reload PHP configuration file at: `\(self.filePath)`")
|
||||
return
|
||||
}
|
||||
|
||||
// Update all properties atomically
|
||||
lines = newLines
|
||||
|
||||
Reference in New Issue
Block a user