Skip to content

Commit 325749d

Browse files
committed
Deprecate passing null as $requestIp to IpUtils::checkIp(), checkIp4() and checkIp6()
1 parent e7009f6 commit 325749d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NoPrivateNetworkHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function request(string $method, string $url, array $options = []): Respo
8080

8181
$options['on_progress'] = function (int $dlNow, int $dlSize, array $info) use ($onProgress, $subnets, &$lastPrimaryIp): void {
8282
if ($info['primary_ip'] !== $lastPrimaryIp) {
83-
if (IpUtils::checkIp($info['primary_ip'], $subnets ?? self::PRIVATE_SUBNETS)) {
83+
if ($info['primary_ip'] && IpUtils::checkIp($info['primary_ip'], $subnets ?? self::PRIVATE_SUBNETS)) {
8484
throw new TransportException(sprintf('IP "%s" is blocked for "%s".', $info['primary_ip'], $info['url']));
8585
}
8686

0 commit comments

Comments
 (0)