Skip to content

Commit

Permalink
Fix importing empty birthdays/anniversaries from vCard.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 21, 2014
1 parent 8421853 commit e332323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions turba/lib/Driver.php
Expand Up @@ -2403,7 +2403,7 @@ public function toHash(Horde_Icalendar_Vcard $vcard)

case 'BDAY':
if (empty($item['value'])) {
$hash['birthday'] = '';
$hash['birthday'] = null;
} else {
$hash['birthday'] = $item['value']['year'] . '-' . $item['value']['month'] . '-' . $item['value']['mday'];
}
Expand Down Expand Up @@ -2450,7 +2450,7 @@ public function toHash(Horde_Icalendar_Vcard $vcard)

case 'X-ANNIVERSARY':
if (empty($item['value'])) {
$hash['anniversary'] = '';
$hash['anniversary'] = null;
} else {
$hash['anniversary'] = $item['value']['year'] . '-' . $item['value']['month'] . '-' . $item['value']['mday'];
}
Expand Down

0 comments on commit e332323

Please sign in to comment.