Skip to content

Commit

Permalink
PHP 8.1 compatibility bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
victorybiz committed Dec 29, 2021
1 parent 88308d8 commit 530a3b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 6 additions & 1 deletion src/WebServices/GeoPluginWebService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public function locate()
"NA" => "North America",
"SA" => "South America"
];
$continent_name = (isset($continents[strtoupper($data['geoplugin_continentCode'])])) ? $continents[strtoupper($data['geoplugin_continentCode'])] : null;

if (isset($data['geoplugin_continentCode']) && !empty($data['geoplugin_continentCode'])) {
$continent_name = (isset($continents[strtoupper($data['geoplugin_continentCode'])])) ? $continents[strtoupper($data['geoplugin_continentCode'])] : null;
} else {
$continent_name = null;
}

$geo_data = [
'ip' => $this->ip,
Expand Down

0 comments on commit 530a3b7

Please sign in to comment.