diff options
author | Mario <mario@mariovavti.com> | 2022-10-12 08:42:41 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-12 08:42:41 +0000 |
commit | c36bb17475b3dd5925cefc32752f1fb8a63df154 (patch) | |
tree | 2f1fce354be40e759c493e02c259d9d3120b4e5f /vendor/sabre/vobject/lib/Component.php | |
parent | 2291fcdf11fe3e03cc84ca8171cd7dcf03015e17 (diff) | |
download | volse-hubzilla-c36bb17475b3dd5925cefc32752f1fb8a63df154.tar.gz volse-hubzilla-c36bb17475b3dd5925cefc32752f1fb8a63df154.tar.bz2 volse-hubzilla-c36bb17475b3dd5925cefc32752f1fb8a63df154.zip |
composer update sabre
Diffstat (limited to 'vendor/sabre/vobject/lib/Component.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Component.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php index f33b628a7..a929387a3 100644 --- a/vendor/sabre/vobject/lib/Component.php +++ b/vendor/sabre/vobject/lib/Component.php @@ -28,7 +28,7 @@ class Component extends Node /** * A list of properties and/or sub-components. * - * @var array + * @var array<string, Component|Property> */ protected $children = []; @@ -43,12 +43,12 @@ class Component extends Node * an iCalendar object, this may be something like CALSCALE:GREGORIAN. To * ensure that this does not happen, set $defaults to false. * - * @param string $name such as VCALENDAR, VEVENT - * @param bool $defaults + * @param string|null $name such as VCALENDAR, VEVENT + * @param bool $defaults */ public function __construct(Document $root, $name, array $children = [], $defaults = true) { - $this->name = strtoupper($name); + $this->name = isset($name) ? strtoupper($name) : ''; $this->root = $root; if ($defaults) { @@ -238,7 +238,7 @@ class Component extends Node return array_filter( $result, function ($child) use ($group) { - return $child instanceof Property && strtoupper($child->group) === $group; + return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group; } ); } @@ -249,7 +249,7 @@ class Component extends Node $result = []; foreach ($this->children as $childGroup) { foreach ($childGroup as $child) { - if ($child instanceof Property && strtoupper($child->group) === $group) { + if ($child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group) { $result[] = $child; } } |