mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02:00
Fix vCard-parser for multible type parameters
This commit is contained in:
parent
0b4c7f3ef6
commit
ac015ec983
@ -641,12 +641,21 @@ class Horde_iCalendar {
|
|||||||
$paramValue = $param_parts[4][$key];
|
$paramValue = $param_parts[4][$key];
|
||||||
if ($paramName == 'TYPE') {
|
if ($paramName == 'TYPE') {
|
||||||
$paramValue = preg_split('/(?<!\\\\),/', $paramValue);
|
$paramValue = preg_split('/(?<!\\\\),/', $paramValue);
|
||||||
|
if (isset($params[$paramName])) {
|
||||||
|
if (!is_array($params[$paramName])) {
|
||||||
|
$params[$paramName] = array($params[$paramName]);
|
||||||
|
}
|
||||||
|
$params[$paramName] = array_merge($params[$paramName], $paramValue);
|
||||||
|
} else {
|
||||||
if (count($paramValue) == 1) {
|
if (count($paramValue) == 1) {
|
||||||
$paramValue = $paramValue[0];
|
$paramValue = $paramValue[0];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$params[$paramName] = $paramValue;
|
$params[$paramName] = $paramValue;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$params[$paramName] = $paramValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Charset and encoding handling.
|
// Charset and encoding handling.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user