When making humanReadable, return a '---' instead of null/empty strings.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 1 Aug 2009 21:22:30 +0000 (17:22 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 1 Aug 2009 21:22:30 +0000 (17:22 -0400)
framework/Image/lib/Horde/Image/Exif.php

index e35c7f4..4e5f53c 100644 (file)
@@ -53,6 +53,7 @@ class Horde_Image_Exif
     {
         return array('Make' => array('description' => _("Camera Make"), 'type' => 'text'),
                      'Model' => array('description' => _("Camera Model"), 'type' => 'text'),
+                     'Software' => array('description' => _("Software Version"), 'type' => 'text'),
                      'ImageType' => array('description' => _("Photo Type"), 'type' => 'text'),
                      'ImageDescription' => array('description' => _("Photo Description"), 'type' => 'text'),
                      'FileSize' => array('description' => _("File Size"), 'type' => 'number'),
@@ -406,10 +407,10 @@ class Horde_Image_Exif
             //       here and let the calling code deal with it, or allow this
             //       method to take an optional charset to convert to (would
             //       introduce a dependency on Horde_String to do the conversion).
-            return substr($data, 7);
+            $data = trim(substr($data, 7));
 
         default:
-            return $data;
+            return !empty($data) ? $data : '---';
         }
     }