From 8a78fdc04bc2d47791040bbe7ab3df5cf71546e7 Mon Sep 17 00:00:00 2001 From: Steve Beaver Date: Thu, 26 Apr 2018 14:44:01 -0400 Subject: [PATCH] PHP7 - Revise vpn_l2tp warning resolution --- src/usr/local/www/vpn_l2tp.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php index c4dc46d108..74600ad357 100644 --- a/src/usr/local/www/vpn_l2tp.php +++ b/src/usr/local/www/vpn_l2tp.php @@ -233,17 +233,12 @@ $section->addInput(new Form_Input( 'Typically this is set to an unused IP just outside of the client range.%1$s%1$s' . 'NOTE: This should NOT be set to any IP address currently in use on this firewall.', '
'); -$nip = new Form_IpAddress( +$section->addInput(new Form_IpAddress( 'remoteip', '*Remote address range', $pconfig['remoteip'] -); - -if (isset($pconfig['l2tp_subnet'])) { - $nip->addMask(l2tp_subnet, $pconfig['l2tp_subnet']); -} - -$nip->setHelp('Specify the starting address for the client IP address subnet.'); +))->addMask('l2tp_subnet', $pconfig['l2tp_subnet']) + ->setHelp('Specify the starting address for the client IP address subnet.'); $section->addInput($nip);