From 53bd14810e9a803419d46c3d666c5761678de40f Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 1 Aug 2009 17:22:30 -0400 Subject: [PATCH] When making humanReadable, return a '---' instead of null/empty strings. --- framework/Image/lib/Horde/Image/Exif.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/Image/lib/Horde/Image/Exif.php b/framework/Image/lib/Horde/Image/Exif.php index e35c7f41a..4e5f53cee 100644 --- a/framework/Image/lib/Horde/Image/Exif.php +++ b/framework/Image/lib/Horde/Image/Exif.php @@ -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 : '---'; } } -- 2.11.0