File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/internal/Magento/Framework/HTTP/PhpEnvironment Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ function (string $ip) {
125
125
public function getRemoteAddress (bool $ ipToLong = false )
126
126
{
127
127
if ($ this ->remoteAddress !== null ) {
128
- return $ ipToLong ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
128
+ return $ ipToLong && $ this -> remoteAddress ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
129
129
}
130
130
131
131
$ remoteAddress = $ this ->readAddress ();
@@ -144,7 +144,7 @@ public function getRemoteAddress(bool $ipToLong = false)
144
144
145
145
$ this ->remoteAddress = $ remoteAddress ;
146
146
147
- return $ ipToLong ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
147
+ return $ ipToLong && $ this -> remoteAddress ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
148
148
}
149
149
150
150
/**
You can’t perform that action at this time.
0 commit comments