Compare commits

..

No commits in common. "master" and "v0.1.1" have entirely different histories.

2 changed files with 3 additions and 6 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "yusurko/useragent", "name": "yusurko/useragent",
"type": "library", "type": "library",
"version": "0.1.2", "version": "0.1.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View file

@ -194,11 +194,8 @@ 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) { if ($this->locator === false) $this->country = Country::outerSpace();
$this->country = Country::outerSpace(); $this->country = $this->locator->locate($this->getAddr());
} else {
$this->country = $this->locator->locate($this->getAddr());
}
} }
return $this->country; return $this->country;
} }