diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-03 23:09:38 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-03 23:09:38 -0400 |
commit | 615385a377ab13f038f4e438b53924e3ee70a584 (patch) | |
tree | 077b8eda8f8813c1b109c40f5719f59d59c2c448 | |
parent | 168d9e3a981e7bbf9d54aa2dd8c1aed4d904238c (diff) | |
download | pfsense-packages-615385a377ab13f038f4e438b53924e3ee70a584.tar.gz pfsense-packages-615385a377ab13f038f4e438b53924e3ee70a584.tar.bz2 pfsense-packages-615385a377ab13f038f4e438b53924e3ee70a584.zip |
Fix PHP warnings from array/string mismatch error.
-rwxr-xr-x | config/snort/snort_preprocessors.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index d5eadfd9..dd8ec660 100755 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -80,6 +80,18 @@ $pconfig = array(); if (isset($id) && isset($a_nat[$id])) { $pconfig = $a_nat[$id]; + // Initialize multiple config engine arrays for supported preprocessors if necessary + if (!is_array($pconfig['frag3_engine']['item'])) + $pconfig['frag3_engine']['item'] = array(); + if (!is_array($pconfig['stream5_tcp_engine']['item'])) + $pconfig['stream5_tcp_engine']['item'] = array(); + if (!is_array($pconfig['http_inspect_engine']['item'])) + $pconfig['http_inspect_engine']['item'] = array(); + if (!is_array($pconfig['ftp_server_engine']['item'])) + $pconfig['ftp_server_engine']['item'] = array(); + if (!is_array($pconfig['ftp_client_engine']['item'])) + $pconfig['ftp_client_engine']['item'] = array(); + /************************************************************/ /* To keep new users from shooting themselves in the foot */ /* enable the most common required preprocessors by default */ @@ -1509,10 +1521,10 @@ if ($savemsg) { <?php $values = array('Credit Card', 'Email Addresses', 'U.S. Phone Numbers', 'U.S. Social Security Numbers'); foreach ($values as $val): ?> - <option value="<?=$val;?>" - <?php if (preg_match("/$val/",$pconfig['sdf_alert_data_type'])) echo "selected"; ?>> + <option value="<?=$val;?>" + <?php if (strpos($pconfig['sdf_alert_data_type'], $val) !== FALSE) echo "selected"; ?>> <?=gettext($val);?></option> - <?php endforeach; ?> + <?php endforeach; ?> </select><br/><?php echo gettext("Choose which types of sensitive data to detect. Use CTRL + Click for multiple selections."); ?><br/> </td> </tr> |