mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +01:00
fix PHP 8.0 TypeError: strlen(): Argument #1 ($str) must be of type string, array given
This commit is contained in:
parent
c9d5eb50db
commit
b69de21bea
@ -306,7 +306,7 @@ class addressbook_groupdav extends Api\CalDAV\Handler
|
|||||||
{
|
{
|
||||||
$content = $is_jscontact ? JsContact::getJsCard($contact['id'], false) :
|
$content = $is_jscontact ? JsContact::getJsCard($contact['id'], false) :
|
||||||
$handler->getVCard($contact['id'],$this->charset,false);
|
$handler->getVCard($contact['id'],$this->charset,false);
|
||||||
$props['getcontentlength'] = bytes($content);
|
$props['getcontentlength'] = bytes(is_array($content) ? json_encode($content) : $content);
|
||||||
$props['address-data'] = Api\CalDAV::mkprop(Api\CalDAV::CARDDAV, 'address-data', $content);
|
$props['address-data'] = Api\CalDAV::mkprop(Api\CalDAV::CARDDAV, 'address-data', $content);
|
||||||
}
|
}
|
||||||
$files[] = $this->add_resource($path, $contact, $props);
|
$files[] = $this->add_resource($path, $contact, $props);
|
||||||
@ -374,7 +374,7 @@ class addressbook_groupdav extends Api\CalDAV\Handler
|
|||||||
if ($address_data)
|
if ($address_data)
|
||||||
{
|
{
|
||||||
$content = $is_jscontact ? JsContact::getJsCardGroup($list, false) : $handler->getGroupVCard($list);
|
$content = $is_jscontact ? JsContact::getJsCardGroup($list, false) : $handler->getGroupVCard($list);
|
||||||
$props['getcontentlength'] = bytes($content);
|
$props['getcontentlength'] = bytes(is_array($content) ? json_encode($content) : $content);
|
||||||
$props['address-data'] = Api\CalDAV::mkprop(Api\CalDAV::CARDDAV, 'address-data', $content);
|
$props['address-data'] = Api\CalDAV::mkprop(Api\CalDAV::CARDDAV, 'address-data', $content);
|
||||||
}
|
}
|
||||||
$files[] = $this->add_resource($path, $list, $props);
|
$files[] = $this->add_resource($path, $list, $props);
|
||||||
|
Loading…
Reference in New Issue
Block a user