aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Component.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:34:03 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:34:03 +0000
commit108a3efe0b6d37a7ed394a84c69b924ca727f17a (patch)
treeed9904767622d769fcee883d407310087ed7d57a /vendor/sabre/vobject/lib/Component.php
parentccd826f63a7a4c7e442fab8a70d9c4c84808b417 (diff)
downloadvolse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.gz
volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.bz2
volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.zip
update composer libs
Diffstat (limited to 'vendor/sabre/vobject/lib/Component.php')
-rw-r--r--vendor/sabre/vobject/lib/Component.php12
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;
}
}