summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-11-28 00:21:42 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-11-28 00:26:07 +0100
commite489f87d99bbbc88a7eddf4a53f8db24490d685c (patch)
tree755986c0d110432ff31afa513fbceeda1bdbb319 /usr/local/www/system_gateways_edit.php
parentf1a1997f45ae2ea2b458bd7102f96c4603d41e98 (diff)
downloadpfsense-e489f87d99bbbc88a7eddf4a53f8db24490d685c.zip
pfsense-e489f87d99bbbc88a7eddf4a53f8db24490d685c.tar.gz
in_array() is needle, haystack. Not the othe way round which throws a wrong datatype warning.
Issue 166
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 687c8c4..6c192a8 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -103,15 +103,15 @@ if ($_POST) {
if (isset($id) && ($a_gateways[$id]) && ($a_gateways[$id] === $gateway))
continue;
- if (($gateway['name'] <> "") && (in_array($gateway, $_POST['name']))) {
+ if (($gateway['name'] <> "") && (in_array($_POST['name'], $gateway))) {
$input_errors[] = "The name \"{$_POST['name']}\" already exists.";
break;
}
- if (($gateway['gateway'] <> "") && (in_array($gateway, $_POST['gateway']))) {
+ if (($gateway['gateway'] <> "") && (in_array($_POST['gateway'], $gateway))) {
$input_errors[] = "The IP address \"{$_POST['gateway']}\" already exists.";
break;
}
- if (($gateway['monitor'] <> "") && (in_array($gateway, $gateway['monitor']))) {
+ if (($gateway['monitor'] <> "") && (in_array($_POST['monitor'], $gateway))) {
$input_errors[] = "The IP address \"{$_POST['monitor']}\" already exists.";
break;
}
OpenPOWER on IntegriCloud