Only set the encoding parameter for binary data in vCards, if data is not empty ...
authorJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 22:34:56 +0000 (23:34 +0100)
committerJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 22:34:56 +0000 (23:34 +0100)
turba/docs/CHANGES
turba/lib/Driver.php

index 27309c9..b8bd31c 100644 (file)
@@ -16,6 +16,8 @@ v3.0-git
 v2.3.6-cvs
 ----------
 
+[jan] Only set the encoding parameter for binary data in vCards, if data is not
+      empty (Bug #9413).
 [jan] Fix searching for fields matching an email address if using 'emails'
       attribute instead of 'email' (Bug #9472).
 [jan] Use personal address books first if determining the default one (Valentin
index 67486d8..a6d619c 100644 (file)
@@ -1593,7 +1593,10 @@ class Turba_Driver implements Countable
             case 'photo':
             case 'logo':
                 $name = Horde_String::upper($key);
-                $params = array('ENCODING' => 'b');
+                $params = array();
+                if (strlen($val)) {
+                    $params['ENCODING'] = 'b';
+                }
                 if (isset($hash[$key . 'type'])) {
                     $params['TYPE'] = $hash[$key . 'type'];
                 }