Skip to content

Commit 2f7a293

Browse files
authored
Fix error "BigBlueButton\Core\Attendee::__construct(): Node no longer exists" if the $xml doesn't have the customdata property.
1 parent fe55f95 commit 2f7a293

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Core/Attendee.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)