aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Parser
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:29:06 +0000
commitccd826f63a7a4c7e442fab8a70d9c4c84808b417 (patch)
treefbbde69114acba764cf6b735433c53e099fd19c5 /vendor/sabre/vobject/lib/Parser
parent5e5f0aa955d86743a14531bed98501b59140ab1f (diff)
downloadvolse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.gz
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.tar.bz2
volse-hubzilla-ccd826f63a7a4c7e442fab8a70d9c4c84808b417.zip
Revert "update composer libs"
This reverts commit 5e5f0aa955d86743a14531bed98501b59140ab1f.
Diffstat (limited to 'vendor/sabre/vobject/lib/Parser')
-rw-r--r--vendor/sabre/vobject/lib/Parser/MimeDir.php20
1 files changed, 4 insertions, 16 deletions
diff --git a/vendor/sabre/vobject/lib/Parser/MimeDir.php b/vendor/sabre/vobject/lib/Parser/MimeDir.php
index 513f7bd0c..db0f81531 100644
--- a/vendor/sabre/vobject/lib/Parser/MimeDir.php
+++ b/vendor/sabre/vobject/lib/Parser/MimeDir.php
@@ -167,11 +167,7 @@ class MimeDir extends Parser
while (true) {
// Reading until we hit END:
- try {
- $line = $this->readLine();
- } catch (EofException $oEx) {
- $line = 'END:'.$this->root->name;
- }
+ $line = $this->readLine();
if ('END:' === strtoupper(substr($line, 0, 4))) {
break;
}
@@ -376,22 +372,12 @@ class MimeDir extends Parser
$value = $this->unescapeParam($value);
if (is_null($lastParam)) {
- if ($this->options & self::OPTION_IGNORE_INVALID_LINES) {
- // When the property can't be matched and the configuration
- // option is set to ignore invalid lines, we ignore this line
- // This can happen when servers provide faulty data as iCloud
- // frequently does with X-APPLE-STRUCTURED-LOCATION
- continue;
- }
throw new ParseException('Invalid Mimedir file. Line starting at '.$this->startLine.' did not follow iCalendar/vCard conventions');
}
if (is_null($property['parameters'][$lastParam])) {
$property['parameters'][$lastParam] = $value;
} elseif (is_array($property['parameters'][$lastParam])) {
$property['parameters'][$lastParam][] = $value;
- } elseif ($property['parameters'][$lastParam] === $value) {
- // When the current value of the parameter is the same as the
- // new one, then we can leave the current parameter as it is.
} else {
$property['parameters'][$lastParam] = [
$property['parameters'][$lastParam],
@@ -464,8 +450,10 @@ class MimeDir extends Parser
switch (strtolower($charset)) {
case 'utf-8':
break;
- case 'windows-1252':
case 'iso-8859-1':
+ $property['value'] = utf8_encode($property['value']);
+ break;
+ case 'windows-1252':
$property['value'] = mb_convert_encoding($property['value'], 'UTF-8', $charset);
break;
default: