From 9d77d005c0928d673aa06bd57139be02a4480974 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 10 Feb 2016 19:02:53 -0600 Subject: ['system']['gitsync'] and ['system']['firmware'] may not be arrays, only unset if they're set to avoid "Cannot unset string offsets". Ticket #5852 --- src/usr/local/www/system_update_settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/usr') diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php index 96b7c6d..d99ea9a 100644 --- a/src/usr/local/www/system_update_settings.php +++ b/src/usr/local/www/system_update_settings.php @@ -78,13 +78,13 @@ if ($_POST) { if ($_POST['disablecheck'] == "yes") { $config['system']['firmware']['disablecheck'] = true; - } else { + } elseif (isset($config['system']['firmware']['disablecheck'])) { unset($config['system']['firmware']['disablecheck']); } if ($_POST['synconupgrade'] == "yes") { $config['system']['gitsync']['synconupgrade'] = true; - } else { + } elseif (isset($config['system']['gitsync']['synconupgrade'])) { unset($config['system']['gitsync']['synconupgrade']); } $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; -- cgit v1.1