aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_post_install.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-12-28 15:10:03 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-28 15:10:03 -0500
commit118c8ebbf9593189fba969f47f60753849181536 (patch)
tree8cd13722475f70ee9ceb1163b7c7e7990dc84961 /config/suricata/suricata_post_install.php
parent0b369ed3ffbc8c57995f8f9176bcc4ae3f8c06ff (diff)
downloadpfsense-packages-118c8ebbf9593189fba969f47f60753849181536.tar.gz
pfsense-packages-118c8ebbf9593189fba969f47f60753849181536.tar.bz2
pfsense-packages-118c8ebbf9593189fba969f47f60753849181536.zip
Fix fatal error 'string offset cannot be array' on greenfield installs.
Diffstat (limited to 'config/suricata/suricata_post_install.php')
-rw-r--r--config/suricata/suricata_post_install.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php
index f4a66b0b..5000a17d 100644
--- a/config/suricata/suricata_post_install.php
+++ b/config/suricata/suricata_post_install.php
@@ -112,6 +112,10 @@ safe_mkdir(SURICATALOGDIR);
safe_mkdir(SURICATA_SID_MODS_PATH);
safe_mkdir(SURICATA_IPREP_PATH);
+// Make sure config variable is an array
+if (!is_array($config['installedpackages']['suricata']['config'][0]))
+ $config['installedpackages']['suricata']['config'][0] = array();
+
// Download the latest GeoIP DB updates and create cron task if the feature is not disabled
if ($config['installedpackages']['suricata']['config'][0]['autogeoipupdate'] != 'off') {
log_error(gettext("[Suricata] Installing free GeoIP country database files..."));