From 3972bedbdf214231552c851183a6fee9f68e0207 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 10 Sep 2018 19:09:08 +0200 Subject: [PATCH] system: fix previous, access before define --- src/www/diag_confbak.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/www/diag_confbak.php b/src/www/diag_confbak.php index 4bb172f4c..8e17f67a2 100644 --- a/src/www/diag_confbak.php +++ b/src/www/diag_confbak.php @@ -38,6 +38,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig['backupcount'] = 60; } + $cnf = OPNsense\Core\Config::getInstance(); + $confvers = $cnf->getBackups(true); + if (!empty($_GET['getcfg'])) { foreach ($confvers as $filename => $revision) { if ($revision['time'] == $_GET['getcfg']) { @@ -54,8 +57,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } } - $cnf = OPNsense\Core\Config::getInstance(); - $confvers = $cnf->getBackups(true); $oldfile = ''; $newfile = ''; $diff = '';