diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php index 23d728e35..a0935f8f5 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php @@ -364,7 +364,7 @@ class Config extends Singleton public function restoreBackup($filename) { - if ($this->statusIsValid) { + if ($this->isValid()) { // if current config is valid, $simplexml = $this->simplexml; try { @@ -377,6 +377,7 @@ class Config extends Singleton $this->simplexml = $simplexml; $this->statusIsValid = true; $this->save(null, true); + return false; } } else { // we don't have a valid config loaded, just copy and load the requested one