There was an error while loading. Please reload this page.
1 parent 03657bf commit da58badCopy full SHA for da58bad
2 files changed
src/VCardBuilder.php
@@ -78,11 +78,14 @@ public function getVersion(): ?VCardVersionEnum
78
{
79
$versionEnum = null;
80
81
- $versionProperty = $this->getProperty('version');
+ $versionProperty = $this->version ?? $this->getProperty('version');
82
83
if ($versionProperty) {
84
- if (! empty($versionProperty->fields)) {
+ if($versionProperty instanceof VCardVersionEnum){
85
+ $versionEnum = $versionProperty;
86
+ }elseif (! empty($versionProperty->fields)) {
87
$versionValue = reset($versionProperty->fields)->value;
88
+
89
$versionEnum = VCardVersionEnum::tryFrom($versionValue);
90
}
91
src/VCardPackage.php
@@ -6,5 +6,5 @@
6
7
class VCardPackage
8
9
- public const VERSION = '1.1.5';
+ public const VERSION = '1.1.6';
10
0 commit comments