mirror of
https://github.com/Mibew/geo-ip-plugin.git
synced 2025-04-12 07:40:11 +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;
|
: $record->city->name;
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'country_name' => $country_name,
|
'country_name' => $country_name ?: 'Unknown',
|
||||||
'country_code' => $record->country->isoCode,
|
'country_code' => $record->country->isoCode ?: false,
|
||||||
'city' => $city,
|
'city' => $city ?: 'Unknown',
|
||||||
'latitude' => $record->location->latitude,
|
'latitude' => $record->location->latitude ?: 0,
|
||||||
'longitude' => $record->location->longitude,
|
'longitude' => $record->location->longitude ?: 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
|
|||||||
*/
|
*/
|
||||||
public static function getVersion()
|
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": {
|
"devDependencies": {
|
||||||
"gulp": "~3.8.10",
|
"gulp": "~3.8.10",
|
||||||
"event-stream": "~3.1.7",
|
"event-stream": "~3.1.7",
|
||||||
|
Loading…
Reference in New Issue
Block a user