summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-03-08 10:49:40 +0545
committerPhil Davis <phil.davis@inf.org>2016-03-08 10:49:40 +0545
commit8d89682e432158dcf5d141c1bb8d4ef3a21b6251 (patch)
tree5f9aadab14b74815896c855cef18178f772d91b9 /src
parent21749f7ab880ed478be77c3b2db2370c22a4e47c (diff)
downloadpfsense-8d89682e432158dcf5d141c1bb8d4ef3a21b6251.zip
pfsense-8d89682e432158dcf5d141c1bb8d4ef3a21b6251.tar.gz
Change invalid use of $iface in interfaces.php
At this point $iface is an undefined var. So the last test of this "if" statement is useless. That code fragment was introduced in commit https://github.com/pfsense/pfsense/commit/e4d40f41aafe00353c0069b457a0b1b0d6c20987 I think that code fragment came from a similar thing that is inside a "foreach $iface" loop in interfaces_pps_edit.php https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/interfaces_ppps_edit.php#L300 and was pasted into the condition here back in 2011 without being changed. What I have done to the test here seems what would have been intended. Any better ideas are welcome.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/interfaces.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 0ff4ce2..ba6cba1 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -803,7 +803,7 @@ if ($_POST['apply']) {
if (($_POST['pptp_subnet0'] && !is_numeric($_POST['pptp_subnet0']))) {
$input_errors[] = gettext("A valid PPTP subnet bit count must be specified.");
}
- if (($_POST['pptp_remote0'] && !is_ipaddrv4($_POST['pptp_remote0']) && !is_hostname($_POST['gateway'][$iface]))) {
+ if (($_POST['pptp_remote0'] && !is_ipaddrv4($_POST['pptp_remote0']) && !is_hostname($_POST['pptp_remote0']))) {
$input_errors[] = gettext("A valid PPTP remote IP address must be specified.");
}
if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) {
OpenPOWER on IntegriCloud