mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +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
2e1f6a983f
commit
d5654e8178
@ -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