mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
fix CardDAV error with DAVx5 caused by PHP 8.0 throwing an error instead ignoring it with a warning
PHP 8.0 ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "tf-" current code expected Content-Type header to have charset enclosed in quotes, which it was not
This commit is contained in:
parent
59794cc3a4
commit
59a6a3c717
@ -696,10 +696,16 @@ class addressbook_groupdav extends Api\CalDAV\Handler
|
||||
{
|
||||
trim($attribute);
|
||||
list($key, $value) = explode('=', $attribute);
|
||||
// check if value is enclosed in quotes
|
||||
if (in_array($value[0], ['"', "'"], true) && $value[0] === substr($value, -1))
|
||||
{
|
||||
$value = substr($value,1,-1);
|
||||
}
|
||||
switch (strtolower($key))
|
||||
{
|
||||
case 'charset':
|
||||
$charset = strtoupper(substr($value,1,-1));
|
||||
$charset = strtoupper($value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user