From d547bc48bce7051472934b5b53cf2f65302b405c Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 8 Nov 2019 10:06:38 +0100 Subject: [PATCH] fix forceReload() closes https://github.com/opnsense/core/issues/3801 --- src/opnsense/mvc/app/library/OPNsense/Core/Config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php index 4f1411c35..eb468d615 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php @@ -308,6 +308,10 @@ class Config extends Singleton */ public function forceReload() { + if ($this->config_file_handle !== null) { + fclose($this->config_file_handle); + $this->config_file_handle = null; + } $this->init(); }