Deal with array types, make sure we start with a positive number here
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 3 Aug 2009 23:11:40 +0000 (19:11 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 3 Aug 2009 23:16:24 +0000 (19:16 -0400)
to avoid double negating the GPS values

framework/Image/lib/Horde/Image/Exif/Base.php

index 5302385..14117e1 100644 (file)
@@ -63,7 +63,7 @@ abstract class Horde_Image_Exif_Base
                                                           $exif[$field . 'Ref'] == 'W' ||
                                                           $exif[$field . 'Ref'] == 'West')) {
 
-                        $value = '-' . $value;
+                        $value = '-' . abs($value);
                     }
                 }
 
@@ -77,6 +77,9 @@ abstract class Horde_Image_Exif_Base
                     }
                 }
 
+                if ($data['type'] == 'array') {
+                    $value = implode(',', $value);
+                }
                 $results[$field] = $value;
             }
         }