Firewall/alias, when traversing config, make sure the item exists, for https://github.com/opnsense/core/issues/3037

This commit is contained in:
Ad Schellevis 2018-12-11 21:34:11 +01:00
parent 5568b35958
commit 54af1c434d

View File

@ -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;