IDS, migration to 1.0.2, fix Trying to get property of non-object in....

This commit is contained in:
Ad Schellevis 2019-01-18 17:36:03 +01:00
parent 9f935b533f
commit c28b7915ee

View File

@ -43,7 +43,9 @@ class M1_0_2 extends BaseModelMigration
{
$cfgObj = Config::getInstance()->object();
$affectedUuids = [];
if (!isset($cfgObj->OPNsense->IDS->userDefinedRules->rule)) {
return;
}
foreach ($cfgObj->OPNsense->IDS->userDefinedRules->rule as $rule) {
if (!empty($rule->geoip) || !empty($rule->geoip_direction)) {
$affectedUuids[] = (string)$rule['uuid'];