Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/PHPExif/Mapper/Native.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,14 @@ protected function isFieldKnown(&$field)
/**
* Extract GPS coordinates from components array
*
* @param array $components
* @param array|string $components
* @return float
*/
protected function extractGPSCoordinate(array $components)
protected function extractGPSCoordinate($components)
{
if (!is_array($components)) {
$components = array($components);
}
$components = array_map(array($this, 'normalizeComponent'), $components);

if (count($components) > 2) {
Expand Down
3 changes: 2 additions & 1 deletion tests/PHPExif/ExifTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ public function testAdapterConsistency()
$methods = $reflClass->getMethods(ReflectionMethod::IS_PUBLIC);
$testfiles = array(
PHPEXIF_TEST_ROOT . '/files/morning_glory_pool_500.jpg',
PHPEXIF_TEST_ROOT . '/files/dsc_5794.jpg'
PHPEXIF_TEST_ROOT . '/files/dsc_5794.jpg',
PHPEXIF_TEST_ROOT . '/files/dsc_0003.jpg'
);

$adapter_exiftool = new \PHPExif\Adapter\Exiftool();
Expand Down
Binary file added tests/files/dsc_0003.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.