Skip to content

Commit

Permalink
Avoid PHP error.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Sep 6, 2016
1 parent dfff3f3 commit ba65b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ public function toHash(Horde_Icalendar_Vcard $vcard)
if (!$email_set &&
(!isset($hash['email']) ||
isset($item['params']['PREF']) ||
(is_array($item['params']['TYPE']) && in_array('PREF', $item['params']['TYPE'])))) {
(!empty($item['params']['TYPE']) && is_array($item['params']['TYPE']) && in_array('PREF', $item['params']['TYPE'])))) {
$e = Horde_Icalendar_Vcard::getBareEmail($item['value']);
$hash['email'] = $e ? $e : '';
}
Expand Down

0 comments on commit ba65b1e

Please sign in to comment.