From e80934cd3ecb5a0b0bc694e8249d05863f8e4f42 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 4 Jan 2016 09:32:12 +0545 Subject: [PATCH] Redmine #5731 Error when setting various system log settings from factory default config Forum https://forum.pfsense.org/index.php?topic=104762.0 --- src/usr/local/www/status_logs.php | 4 +++- src/usr/local/www/status_logs_filter.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index 4a1ff52d29..adf5ecccb8 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -191,7 +191,9 @@ if ($save_settings) { if (!$input_errors) { # Clear out the specific log settings and leave only the applied settings to override the general logging options (global) settings. - unset($config['syslog'][$specific_log]); + if (isset($config['syslog'][$specific_log])) { + unset($config['syslog'][$specific_log]); + } # All if ($cronorder != '') { # if not using the general logging options setting (global) diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php index 132c76b50f..cd3117ee8e 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -213,7 +213,9 @@ if ($save_settings) { if (!$input_errors) { # Clear out the specific log settings and leave only the applied settings to override the general logging options (global) settings. - unset($config['syslog'][$specific_log]); + if (isset($config['syslog'][$specific_log])) { + unset($config['syslog'][$specific_log]); + } # All if ($cronorder != '') { # if not using the general logging options setting (global)