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) {
125125 public function getRemoteAddress (bool $ ipToLong = false )
126126 {
127127 if ($ this ->remoteAddress !== null ) {
128- return $ ipToLong ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
128+ return $ ipToLong && $ this -> remoteAddress ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
129129 }
130130
131131 $ remoteAddress = $ this ->readAddress ();
@@ -144,7 +144,7 @@ public function getRemoteAddress(bool $ipToLong = false)
144144
145145 $ this ->remoteAddress = $ remoteAddress ;
146146
147- return $ ipToLong ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
147+ return $ ipToLong && $ this -> remoteAddress ? ip2long ($ this ->remoteAddress ) : $ this ->remoteAddress ;
148148 }
149149
150150 /**
You can’t perform that action at this time.
0 commit comments