On every reboot I get this system status error:
[20-Feb-2025 11:33:41 America/New_York] PHP Fatal error: Uncaught Error: Call to a member function add() on null in /usr/local/opnsense/mvc/app/models/OPNsense/Unbound/Migrations/M1_0_1.php:96
Stack trace:
#0 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(790): OPNsense\Unbound\Migrations\M1_0_1->run(Object(OPNsense\Unbound\Unbound))
#1 /usr/local/opnsense/mvc/script/run_migrations.php(54): OPNsense\Base\BaseModel->runMigrations()
#2 {main}
thrown in /usr/local/opnsense/mvc/app/models/OPNsense/Unbound/Migrations/M1_0_1.php on line 96
Unbound loads correctly, if I reload/stop/start unbound the error does not come back.
I looked at M1_0_1.php...
94 if (!empty($config->unbound->domainoverrides)) {
95 foreach ($config->unbound->domainoverrides as $old_domain) {
96 $new_domain = $model->domains->domain->add();
97 $domain_data = [
98 'enabled' => 1,
99 'domain' => $old_domain->domain,
100 'server' => $old_domain->ip,
101 'description' => !empty($old_domain->descr) ? substr($old_domain->descr, 0, 255) : null
102 ];
103 $new_domain->setNodes($domain_data);
Could this be coming form a bad entry in my Unbound DNS Overrides?
I would appreciate if anyone could point me in the right direction on diagnosing this.
Thank you!