added trim to remove white spaces

This commit is contained in:
2021-11-30 20:08:53 -05:00
parent fbe3e548ff
commit 53dbcba377

View File

@@ -39,7 +39,7 @@ foreach ($config['virtualip']['vip'] as $i => $vip) {
if ($vip['interface'] == $wanInterface) {
$description = $config['virtualip']['vip'][$i]['descr'];
# 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)) {
foreach ($config['gateways']['gateway_item'] as $i => $gateway) {
if ($gateway['name'] == $gatewayName) {