mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
fix PHP 8.0 error: trim() expects parameter 1 to be string, array given
This commit is contained in:
parent
facdf2d119
commit
44a1e7f990
@ -971,11 +971,12 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
{
|
{
|
||||||
if (!empty($fieldName))
|
if (!empty($fieldName))
|
||||||
{
|
{
|
||||||
$value = trim($vcardValues[$vcardKey]['values'][$fieldKey]);
|
$value = $vcardValues[$vcardKey]['values'][$fieldKey];
|
||||||
|
if (is_string($value)) $value = trim($value);
|
||||||
|
|
||||||
if ($pref_tel && (($vcardKey == $pref_tel) ||
|
if ($pref_tel && (($vcardKey == $pref_tel) ||
|
||||||
($vcardValues[$vcardKey]['name'] == 'TEL') &&
|
($vcardValues[$vcardKey]['name'] == 'TEL') &&
|
||||||
($vcardValues[$vcardKey]['value'] == $vcardValues[$pref_tel]['value'])))
|
($vcardValues[$vcardKey]['value'] == $vcardValues[$pref_tel]['value'])))
|
||||||
{
|
{
|
||||||
$contact['tel_prefer'] = $fieldName;
|
$contact['tel_prefer'] = $fieldName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user