diff options
author | Renato Botelho <renato@netgate.com> | 2017-08-16 10:58:25 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-08-16 11:03:13 -0300 |
commit | fb8c533aab03f84017a844ba873bd50982e10d3e (patch) | |
tree | d7c5748f7a880c136c0001d581c5f9cc08e9fbbf | |
parent | dce4b719dd871c80fb8fb3d3479bd70e8949daa1 (diff) | |
download | pfsense-fb8c533aab03f84017a844ba873bd50982e10d3e.zip pfsense-fb8c533aab03f84017a844ba873bd50982e10d3e.tar.gz |
Do not use reference to avoid losing data
-rw-r--r-- | src/etc/inc/config.lib.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 9d8615b..e0f5646 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -456,7 +456,7 @@ function convert_config() { if (!is_array($config['system']['already_run_config_upgrade'])) { $config['system']['already_run_config_upgrade'] = array(); } - $already_run =& $config['system']['already_run_config_upgrade']; + $already_run = $config['system']['already_run_config_upgrade']; /* Loop and run upgrade_VER_to_VER() until we're at current version */ while ($config['version'] < $g['latest_config']) { @@ -472,7 +472,9 @@ function convert_config() { } if (isset($already_run[$migration_function])) { /* Already executed, skip now */ - unset($already_run[$migration_function]); + unset($config['system'] + ['already_run_config_upgrade'] + [$migration_function]); } else { $migration_function(); } |