diff --git a/src/etc/inc/config.inc b/src/etc/inc/config.inc index 8163bccfb..d57ec1e39 100644 --- a/src/etc/inc/config.inc +++ b/src/etc/inc/config.inc @@ -197,7 +197,20 @@ function write_config($desc = '', $backup = true) } } - plugins_interfaces(); + /** + * XXX: Temporary construction. + * When called via a legacy interface configure page, we might want to register new interfaces, but + * in cases we just want to save our changes (not related to interfaces), we risk raising errors for + * missing imports. + * Eventually relevant callers should call 'interface invoke registration', which is the same as + * mvc components use now (but can't be called here without side effects) + */ + try { + plugins_interfaces(); + } catch (Throwable $e) { + null; + } + $cnf = OPNsense\Core\Config::getInstance(); $cnf->fromArray($config);