From c94259340f341e532246c415e93158f02f3b5f0a Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 23 Jan 2013 20:12:14 +0100 Subject: Prevent errors from missing files Reported-by: http://forum.pfsense.org/index.php/topic,51493.msg310252.html#msg310252 --- config/snort/snort.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index d7db399e..cd76db6f 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -944,6 +944,9 @@ function snort_load_rules_map($rules_path) { /* Read the file contents into an array, skipping */ /* empty lines. */ + if (!file_exists($file)) + continue; + $rules_array = file($file, FILE_SKIP_EMPTY_LINES); $record = ""; $b_Multiline = false; -- cgit v1.2.3