Skip to content

Commit

Permalink
check if $t is an array
Browse files Browse the repository at this point in the history
Additional is_array check for phone number type, because when using a user defined type for a phone number, $t is not an array so empty($t['Type']) will raise an error and the number will not be imported.
  • Loading branch information
wweich committed Oct 20, 2014
1 parent d795619 commit 2a93851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion carddav2fb.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function get_carddav_entries() {
foreach($vcard_obj->tel as $t) {

$prio = 0;
if (empty($t['Type'])) {
if (!is_array($t) || empty($t['Type'])) {
$type = "mobile";
$phone_number = $t;
} else {
Expand Down

0 comments on commit 2a93851

Please sign in to comment.