From 54af1c434d274d00743fff0564e2e2f0fea7069d Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 11 Dec 2018 21:34:11 +0100 Subject: [PATCH] Firewall/alias, when traversing config, make sure the item exists, for https://github.com/opnsense/core/issues/3037 --- src/opnsense/mvc/app/models/OPNsense/Firewall/Alias.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Firewall/Alias.php b/src/opnsense/mvc/app/models/OPNsense/Firewall/Alias.php index 282e558eb..efc88cc08 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Firewall/Alias.php +++ b/src/opnsense/mvc/app/models/OPNsense/Firewall/Alias.php @@ -80,7 +80,9 @@ class Alias extends BaseModel foreach ($this->getAliasSource() as $aliasref) { $cfgsection = $cfgObj; foreach ($aliasref[0] as $cfgName) { - $cfgsection = $cfgsection->$cfgName; + if ($cfgsection != null) { + $cfgsection = $cfgsection->$cfgName; + } } if ($cfgsection != null) { $nodeidx = 0;