From 22ac38ea3ff7861af354f25ffe433c9e188e6f8d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 26 Sep 2006 17:13:29 +0000 Subject: Do not run in_array() on non arrays --- packages/snort/snort_rulesets.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/snort/snort_rulesets.php b/packages/snort/snort_rulesets.php index c6b84b66..46bc083f 100644 --- a/packages/snort/snort_rulesets.php +++ b/packages/snort/snort_rulesets.php @@ -99,11 +99,14 @@ include("head.inc"); continue; echo ""; echo ""; - if(in_array($file, $enabled_rulesets_array)) { - $CHECKED = " checked=\"checked\""; - } else { + if(is_array($enabled_rulesets_array)) + if(in_array($file, $enabled_rulesets_array)) { + $CHECKED = " checked=\"checked\""; + } else { + $CHECKED = ""; + } + else $CHECKED = ""; - } echo " "; echo ""; echo ""; -- cgit v1.2.3