From 8d89682e432158dcf5d141c1bb8d4ef3a21b6251 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 8 Mar 2016 10:49:40 +0545 Subject: 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. --- src/usr/local/www/interfaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/usr/local/www/interfaces.php') 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'])) { -- cgit v1.1