Ensured visits with empty remote address are not tried to be located

This commit is contained in:
Alejandro Celaya
2018-10-18 19:19:42 +02:00
parent 36ab475578
commit 5be7f839f3
3 changed files with 30 additions and 11 deletions

View File

@@ -102,6 +102,11 @@ class Visit extends AbstractEntity implements \JsonSerializable
return $this;
}
public function hasRemoteAddr(): bool
{
return ! empty($this->remoteAddr);
}
private function obfuscateAddress(?string $address): ?string
{
// Localhost addresses do not need to be obfuscated