Error in function upgrade_144_to_145()
-
Hi,
I just got an error uploading a years-old pfSense config to a new firewall (config version 12.0, v2.2.6 -> v2.4.4p3), and I hit upon this error:
Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/upgrade_config.inc:4574 Stack trace: #0 /etc/inc/config.lib.inc(378): upgrade_144_to_145() #1 /usr/local/www/diag_backup.php(425): convert_config() #2 {main} thrown in /etc/inc/upgrade_config.inc on line 4574 PHP ERROR: Type: 1, File: /etc/inc/upgrade_config.inc, Line: 4574, Message: Uncaught Error: Cannot use string offset as an array in /etc/inc/upgrade_config.inc:4574 Stack trace: #0 /etc/inc/config.lib.inc(378): upgrade_144_to_145() #1 /usr/local/www/diag_backup.php(425): convert_config() #2 {main} thrown
(Whitespace fixed up manually.)
Looking at the
upgrade_144_to_145()
function in https://github.com/pfsense/pfsense/blob/78a6cfe3772059a323661fd024e235ec39bdce3e/src/etc/inc/upgrade_config.inc#L4564, I found it referred to the dhcpdv6 section of the config.In my config.xml, I found this was present but blank (self-closing, i.e.
<dhcpdv6/>
). After commenting this out, I was able to upgrade the config.Probably an uncommon case, but I thought I would post a report, so it can be fixed, or so someone else searching the error might be able to find it.
-
https://redmine.pfsense.org/issues/9840