From 866e537d5b1110fe3f7bc00eff6d2a4213d6b841 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 16 Aug 2017 10:58:25 -0300 Subject: Do not use reference to avoid losing data --- src/etc/inc/config.lib.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/etc') diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index e0172c7..988c9b8 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -355,7 +355,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']) { @@ -371,7 +371,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(); } -- cgit v1.1