Skip to content

Commit f3cc3d6

Browse files
authored
Fixed reading attendees (fixes #75)
Without the fix the API client will fail reading attendees via `getMeetingInfo` with "Node no longer exists"
1 parent 3256e88 commit f3cc3d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Core/Attendee.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Attendee
5858
/**
5959
* @var array
6060
*/
61-
private $customData;
61+
private $customData = [];
6262

6363
/**
6464
* @var string
@@ -80,8 +80,10 @@ public function __construct($xml)
8080
$this->hasVideo = $xml->hasVideo->__toString() === 'true';
8181
$this->clientType = $xml->clientType->__toString();
8282

83-
foreach ($xml->customdata->children() as $data) {
84-
$this->customData[$data->getName()] = $data->__toString();
83+
if ($xml->customData) {
84+
foreach ($xml->customdata->children() as $data) {
85+
$this->customData[$data->getName()] = $data->__toString();
86+
}
8587
}
8688
}
8789

0 commit comments

Comments
 (0)