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

Address doesn't support umlauts #193

Open
JamesPoel opened this issue Dec 17, 2021 · 0 comments
Open

Address doesn't support umlauts #193

JamesPoel opened this issue Dec 17, 2021 · 0 comments

Comments

@JamesPoel
Copy link

JamesPoel commented Dec 17, 2021

One of my address paramters has an umlaut, so I am utf8_encoding it to correctly display it in the vcard.
This works for other fields, but for address, it produces an error.

Example:

$vcard->addAddress(null, null, 'street', utf8_decode( 'woërktown' ), null, 'workpostcode', 'Belgium');

array_chunk() expects parameter 1 to be array, bool given
vendor/jeroendesloovere/vcard/src/VCard.php:655

It is this line that is to blame:
$array = array_chunk(
preg_split("//u", $body, -1, PREG_SPLIT_NO_EMPTY), $chunklen);

If i change it to:
$array = array_chunk(str_split($body));

it works.

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

No branches or pull requests

1 participant