0.1.2 fix UserAgent behavior in absence of a locator
This commit is contained in:
parent
fb7e378e1f
commit
d7ab4d30e0
1 changed files with 5 additions and 2 deletions
|
|
@ -194,9 +194,12 @@ a:link, a:visited {color: #39f}
|
||||||
public function getCountry() {
|
public function getCountry() {
|
||||||
if ($this->country === null) {
|
if ($this->country === null) {
|
||||||
if ($this->locator === null) $this->locator = $this->probeLocator();
|
if ($this->locator === null) $this->locator = $this->probeLocator();
|
||||||
if ($this->locator === false) $this->country = Country::outerSpace();
|
if ($this->locator === false) {
|
||||||
|
$this->country = Country::outerSpace();
|
||||||
|
} else {
|
||||||
$this->country = $this->locator->locate($this->getAddr());
|
$this->country = $this->locator->locate($this->getAddr());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $this->country;
|
return $this->country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue