Skip to content

Commit

Permalink
Technically, this represents degrees.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Apr 18, 2016
1 parent f4b9784 commit 303bb59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/Image/lib/Horde/Image/Exif/Base.php
Expand Up @@ -121,14 +121,14 @@ protected function _parseGPSData($data)
}

if (strpos($data[0], '/') !== false) {
$hour = explode('/', $data[0]);
if (count($hour) > 1) {
$hour = $hour[0] / $hour[1];
$degrees = explode('/', $data[0]);
if (count($degrees) > 1) {
$degrees = $degrees[0] / $degrees[1];
} else {
$hour = $hour[0];
$degrees = $degrees[0];
}
} else {
$hour = $data[0];
$degrees = $data[0];
}

if (strpos($data[1], '/') !== false) {
Expand All @@ -153,7 +153,7 @@ protected function _parseGPSData($data)
$sec = $data[2];
}

return self::_degToDecimal($hour, $min, $sec);
return self::_degToDecimal($degrees, $min, $sec);
}

/**
Expand Down

0 comments on commit 303bb59

Please sign in to comment.