added trim to remove white spaces
This commit is contained in:
@@ -39,7 +39,7 @@ foreach ($config['virtualip']['vip'] as $i => $vip) {
|
|||||||
if ($vip['interface'] == $wanInterface) {
|
if ($vip['interface'] == $wanInterface) {
|
||||||
$description = $config['virtualip']['vip'][$i]['descr'];
|
$description = $config['virtualip']['vip'][$i]['descr'];
|
||||||
# VIP WAN (GW: $gatewayIP)
|
# VIP WAN (GW: $gatewayIP)
|
||||||
$gatewayIP = substr(explode(":", $description)[1], 0, -1);
|
$gatewayIP = trim(substr(explode(":", $description)[1], 0, -1));
|
||||||
if (filter_var($gatewayIP, FILTER_VALIDATE_IP)) {
|
if (filter_var($gatewayIP, FILTER_VALIDATE_IP)) {
|
||||||
foreach ($config['gateways']['gateway_item'] as $i => $gateway) {
|
foreach ($config['gateways']['gateway_item'] as $i => $gateway) {
|
||||||
if ($gateway['name'] == $gatewayName) {
|
if ($gateway['name'] == $gatewayName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user