Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/BigBlueButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,10 @@ private function sendRequest(string $url, string $payload = '', string $contentT
throw new BadResponseException('Bad response, HTTP code: ' . $httpCode . ', url: ' . $url);
}

// CLOSE AND UNSET
curl_close($ch);
// UNSET
// Note: curl_close() is intentionally omitted. Since PHP 8.0 the curl handle is a
// CurlHandle object that is freed automatically by the garbage collector once unset,
// curl_close() has no effect and was deprecated in PHP 8.5.
unset($ch);

// RETURN
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/DeleteRecordingsParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DeleteRecordingsParameters extends BaseParameters
{
private ?string $recordingId = null;

public function __construct(string $recordingId = null)
public function __construct(?string $recordingId = null)
{
$this->recordingId = $recordingId;
}
Expand Down
10 changes: 6 additions & 4 deletions src/Parameters/DocumentableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function getPresentations(): array
return $this->presentations;
}

public function addPresentation(string $nameOrUrl, $content = null, ?string $filename = null, DocumentOptionsStore $attributes = null): self
public function addPresentation(string $nameOrUrl, $content = null, ?string $filename = null, ?DocumentOptionsStore $attributes = null): self
{
$this->presentations[$nameOrUrl] = [
'content' => !$content ?: base64_encode($content),
'content' => null !== $content ? base64_encode($content) : null,
'filename' => $filename,
'attributes' => $attributes
];
Expand Down Expand Up @@ -73,8 +73,10 @@ public function getPresentationsAsXML(): string
}

// Add attributes using DocumentAttributes class
foreach ($data['attributes']->getAttributes() as $attrName => $attrValue) {
$presentation->addAttribute($attrName, $attrValue);
if ($data['attributes'] instanceof DocumentOptionsStore) {
foreach ($data['attributes']->getAttributes() as $attrName => $attrValue) {
$presentation->addAttribute($attrName, $attrValue);
}
}
}
$result = $xml->asXML();
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/EndMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class EndMeetingParameters extends BaseParameters
*/
private ?string $password = null;

public function __construct(string $meetingId = null, string $password = null)
public function __construct(?string $meetingId = null, ?string $password = null)
{
$this->password = $password;
$this->meetingId = $meetingId;
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/GetRecordingTextTracksParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GetRecordingTextTracksParameters extends MetaParameters
/**
* GetRecordingTextTracksParameters constructor.
*/
public function __construct(string $recordId = null)
public function __construct(?string $recordId = null)
{
$this->recordId = $recordId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/InsertDocumentParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InsertDocumentParameters extends BaseParameters

private ?string $meetingId = null;

public function __construct(string $meetingId = null)
public function __construct(?string $meetingId = null)
{
$this->meetingId = $meetingId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/IsMeetingRunningParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IsMeetingRunningParameters extends BaseParameters
{
private ?string $meetingId = null;

public function __construct(string $meetingId = null)
public function __construct(?string $meetingId = null)
{
$this->meetingId = $meetingId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/PutRecordingTextTrackParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PutRecordingTextTrackParameters extends BaseParameters
/**
* PutRecordingTextTrackParameters constructor.
*/
public function __construct(string $recordId = null, string $kind = null, string $lang = null, string $label = null)
public function __construct(?string $recordId = null, ?string $kind = null, ?string $lang = null, ?string $label = null)
{
$this->recordId = $recordId;
$this->kind = $kind;
Expand Down
2 changes: 1 addition & 1 deletion src/Parameters/UpdateRecordingsParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class UpdateRecordingsParameters extends MetaParameters
{
private ?string $recordingId = null;

public function __construct(string $recordingId = null)
public function __construct(?string $recordingId = null)
{
$this->recordingId = $recordingId;
}
Expand Down