Fix IPv6 network detection for Docker custom networks

This commit is contained in:
bergware
2021-08-06 20:23:12 +02:00
parent 1c217d5011
commit 27253c6b3d

View File

@@ -25,11 +25,8 @@ $DockerStopped = pgrep('dockerd')===false;
function strposX($s, $c, $n=1) {
$p = 0;
while ($p = strpos($s,$c,$p)!==false) {
if (!--$n) return $p;
$p++;
}
return false;
while ($n && $p=strpos($s,$c,$p)!==false) {$n--; $p+=strlen($c);}
return $p;
}
unset($custom,$other);