Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact name not imported for ownCloud created contacts #9

Open
Fensterbank opened this issue Jun 14, 2016 · 0 comments
Open

Contact name not imported for ownCloud created contacts #9

Fensterbank opened this issue Jun 14, 2016 · 0 comments

Comments

@Fensterbank
Copy link
Contributor

I'm testing this script with the newest owncloud / nextcloud release and noticed it doesn't work for me.

PHP Notice:  Undefined offset: 0 in /home/fileshare/carddav2fb/carddav2fb.php on line 181
PHP Notice:  Undefined offset: 0 in /home/fileshare/carddav2fb/carddav2fb.php on line 186

The undefined offset occurs because there is no real name in the vcard, only the FN (friendly name) is set, which is not used from the script.

BEGIN:VCARD
VERSION:3.0
FN:Mike Kunze
UID:bc44600d-ff0f-4400-89b1-518e39d6a0d8
TEL;TYPE=HOME\,VOICE:06439 69 75 74
END:VCARD

The result is that we don't have a name and entries are imported like with a null value
fritz

For me I would be fixed by using $vcard_obj->fn[0] instead of $vcard_obj->n[0].
I'm ready to test it and bring up a pull request, but I'm not sure, if this is really broken or it's a special case.
Did you have the N-Property in you vcard files?
Which owncloud version did you used?

I tested it in a brand new nextcloud installation with brand new contacts created inside of the contacts app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant