From c28b7915eee1a48aae18b3f90f1734efaa3e9b72 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 18 Jan 2019 17:36:03 +0100 Subject: [PATCH] IDS, migration to 1.0.2, fix Trying to get property of non-object in.... --- .../mvc/app/models/OPNsense/IDS/Migrations/M1_0_2.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/IDS/Migrations/M1_0_2.php b/src/opnsense/mvc/app/models/OPNsense/IDS/Migrations/M1_0_2.php index 9e542fe35..e57b4f09d 100644 --- a/src/opnsense/mvc/app/models/OPNsense/IDS/Migrations/M1_0_2.php +++ b/src/opnsense/mvc/app/models/OPNsense/IDS/Migrations/M1_0_2.php @@ -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'];