diff --git a/composer.json b/composer.json index ee4d592..adf022a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "blockmurder/winlinkapi", "description": "Adds a cron job which gets the latest poition reports of your callsing from WinLink.org and adds them to your database", "type": "bolt-extension", - "version": "0.1.2", + "version": "0.1.3", "keywords": [ "winlink", "positions", diff --git a/src/WinLinkAPIExtension.php b/src/WinLinkAPIExtension.php index 1ed2e36..0d7b5a9 100644 --- a/src/WinLinkAPIExtension.php +++ b/src/WinLinkAPIExtension.php @@ -220,7 +220,13 @@ private function ddToDms($dec) // Converts decimal format to DMS ( Degrees / minutes / seconds ) $vars = explode(".",$dec); $deg = $vars[0]; - $tempma = "0.".$vars[1]; + + if(count($vars)>1) + { + $tempma = "0.".$vars[1]; + }else{ + $tempma = "0.0"; + } $tempma = $tempma * 3600; $min = floor($tempma / 60);