We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88308d8 commit 530a3b7Copy full SHA for 530a3b7
.DS_Store
0 Bytes
src/WebServices/GeoPluginWebService.php
@@ -45,7 +45,12 @@ public function locate()
45
"NA" => "North America",
46
"SA" => "South America"
47
];
48
- $continent_name = (isset($continents[strtoupper($data['geoplugin_continentCode'])])) ? $continents[strtoupper($data['geoplugin_continentCode'])] : null;
+
49
+ if (isset($data['geoplugin_continentCode']) && !empty($data['geoplugin_continentCode'])) {
50
+ $continent_name = (isset($continents[strtoupper($data['geoplugin_continentCode'])])) ? $continents[strtoupper($data['geoplugin_continentCode'])] : null;
51
+ } else {
52
+ $continent_name = null;
53
+ }
54
55
$geo_data = [
56
'ip' => $this->ip,
0 commit comments