Skip to content

Commit 3facf57

Browse files
committed
Wireguard: fix PHP error on import
1 parent 5a22248 commit 3facf57

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

emhttp/plugins/dynamix/include/update.wireguard.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,9 @@ function parseInput($vtun, &$input, &$x) {
541541
$vpn = (in_array($default4,$vpn) || in_array($default6,$vpn)) ? 8 : 0;
542542
if ($vpn==8) $import["Address:$n"] = '';
543543
$import["TYPE:$n"] = $vpn;
544-
ipfilter(_var($import,"AllowedIPs:$n"));
545-
if (_var($import,"TYPE:$n") == 0) $var['subnets1'] = "AllowedIPs="._var($import,"AllowedIPs:$n");
544+
$allowedIPs = _var($import,"AllowedIPs:$n")
545+
ipfilter($allowedIPs);
546+
if (_var($import,"TYPE:$n") == 0) $var['subnets1'] = "AllowedIPs=".$allowedIPs);
546547
}
547548
foreach ($import as $key => $val) $sort[] = explode(':',$key)[1];
548549
array_multisort($sort, $import);

0 commit comments

Comments
 (0)