diff options
Diffstat (limited to 'vendor/sabre/vobject/lib')
-rw-r--r-- | vendor/sabre/vobject/lib/Component.php | 17 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/Component/VCard.php | 5 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/Version.php | 2 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/timezonedata/exchangezones.php | 1 |
4 files changed, 23 insertions, 2 deletions
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php index 9a10ed3f8..ac87a10ec 100644 --- a/vendor/sabre/vobject/lib/Component.php +++ b/vendor/sabre/vobject/lib/Component.php @@ -662,8 +662,23 @@ class Component extends Node { break; case '?' : if (isset($propertyCounters[$propName]) && $propertyCounters[$propName] > 1) { + $level = 3; + + // We try to repair the same property appearing multiple times with the exact same value + // by removing the duplicates and keeping only one property + if ($options & self::REPAIR) { + $properties = array_unique($this->select($propName), SORT_REGULAR); + + if (count($properties) === 1) { + $this->remove($propName); + $this->add($properties[0]); + + $level = 1; + } + } + $messages[] = [ - 'level' => 3, + 'level' => $level, 'message' => $propName . ' MUST NOT appear more than once in a ' . $this->name . ' component', 'node' => $this, ]; diff --git a/vendor/sabre/vobject/lib/Component/VCard.php b/vendor/sabre/vobject/lib/Component/VCard.php index 4f620de10..bca623d5e 100644 --- a/vendor/sabre/vobject/lib/Component/VCard.php +++ b/vendor/sabre/vobject/lib/Component/VCard.php @@ -295,6 +295,11 @@ class VCard extends VObject\Document { } elseif (isset($this->ORG)) { $this->FN = (string)$this->ORG; $repaired = true; + + // Otherwise, the EMAIL property may work + } elseif (isset($this->EMAIL)) { + $this->FN = (string)$this->EMAIL; + $repaired = true; } } diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php index 346e2044d..24c51a604 100644 --- a/vendor/sabre/vobject/lib/Version.php +++ b/vendor/sabre/vobject/lib/Version.php @@ -14,6 +14,6 @@ class Version { /** * Full version number. */ - const VERSION = '4.1.2'; + const VERSION = '4.1.3'; } diff --git a/vendor/sabre/vobject/lib/timezonedata/exchangezones.php b/vendor/sabre/vobject/lib/timezonedata/exchangezones.php index 38138354a..edba5b473 100644 --- a/vendor/sabre/vobject/lib/timezonedata/exchangezones.php +++ b/vendor/sabre/vobject/lib/timezonedata/exchangezones.php @@ -85,6 +85,7 @@ return [ 'Saskatchewan' => 'America/Edmonton', 'Arizona' => 'America/Phoenix', 'Mountain Time (US & Canada)' => 'America/Denver', // Best guess + 'Pacific Time (US & Canada)' => 'America/Los_Angeles', // Best guess 'Pacific Time (US & Canada); Tijuana' => 'America/Los_Angeles', // Best guess 'Alaska' => 'America/Anchorage', 'Hawaii' => 'Pacific/Honolulu', |