diff --git a/src/UserAgent.php b/src/UserAgent.php index 7fbf1dd..93321b1 100644 --- a/src/UserAgent.php +++ b/src/UserAgent.php @@ -194,8 +194,11 @@ a:link, a:visited {color: #39f} public function getCountry() { if ($this->country === null) { if ($this->locator === null) $this->locator = $this->probeLocator(); - if ($this->locator === false) $this->country = Country::outerSpace(); - $this->country = $this->locator->locate($this->getAddr()); + if ($this->locator === false) { + $this->country = Country::outerSpace(); + } else { + $this->country = $this->locator->locate($this->getAddr()); + } } return $this->country; }