Skip to content

Commit

Permalink
Don't set the AIRSYNCBASEBODY property if there is no body.
Browse files Browse the repository at this point in the history
Possibly fixes some issues with certain versions of Android.
  • Loading branch information
mrubinsk committed Feb 14, 2016
1 parent ab350dd commit e5389ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions turba/lib/Driver.php
Expand Up @@ -2694,7 +2694,7 @@ public function toASContact(Turba_Object $object, array $options = array())
break;

case 'notes':
if ($options['protocolversion'] > Horde_ActiveSync::VERSION_TWOFIVE) {
if (strlen($value) && $options['protocolversion'] > Horde_ActiveSync::VERSION_TWOFIVE) {
$bp = $options['bodyprefs'];
$note = new Horde_ActiveSync_Message_AirSyncBaseBody();
// No HTML supported in Turba's notes. Always use plaintext.
Expand All @@ -2709,7 +2709,7 @@ public function toASContact(Turba_Object $object, array $options = array())
$note->estimateddatasize = Horde_String::length($value);
}
$message->airsyncbasebody = $note;
} else {
} elseif (strlen($value)) {
// EAS 2.5
$message->body = $value;
$message->bodysize = strlen($message->body);
Expand Down

0 comments on commit e5389ba

Please sign in to comment.