mirror of
https://github.com/Mibew/geo-ip-plugin.git
synced 2024-11-15 08:54:14 +03:00
Return the (0,0) position when IP is not found in the base
This commit is contained in:
parent
702770661b
commit
dc2f6d7bd3
12
Plugin.php
12
Plugin.php
@ -103,11 +103,11 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
|
||||
: $record->city->name;
|
||||
|
||||
return array(
|
||||
'country_name' => $country_name,
|
||||
'country_code' => $record->country->isoCode,
|
||||
'city' => $city,
|
||||
'latitude' => $record->location->latitude,
|
||||
'longitude' => $record->location->longitude,
|
||||
'country_name' => $country_name ?: 'Unknown',
|
||||
'country_code' => $record->country->isoCode ?: false,
|
||||
'city' => $city ?: 'Unknown',
|
||||
'latitude' => $record->location->latitude ?: 0,
|
||||
'longitude' => $record->location->longitude ?: 0,
|
||||
);
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
|
||||
*/
|
||||
public static function getVersion()
|
||||
{
|
||||
return '1.0.0';
|
||||
return '1.0.1';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.8.10",
|
||||
"event-stream": "~3.1.7",
|
||||
|
Loading…
Reference in New Issue
Block a user