Skip to content

Commit

Permalink
webservice: use string 'null' when recording_type is null
Browse files Browse the repository at this point in the history
This allows the data to be loaded in the database and not throw an exception. In theory, the value should never be null, but somehow it is for one of our users. In the rare case where this occurs, Moodle may show the string "null", but I'm not too worried about that being the worst-case.
  • Loading branch information
jrchamp authored Sep 19, 2024
1 parent 6598de0 commit 03c7c3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/webservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ public function get_recording_url_list($meetingid) {
$recordinginfo->meetinguuid = $response->uuid;
$recordinginfo->url = $url;
$recordinginfo->filetype = $recording->file_type;
$recordinginfo->recordingtype = $recording->recording_type;
$recordinginfo->recordingtype = $recording->recording_type ?? 'null';
$recordinginfo->passcode = $response->password;
$recordinginfo->recordingstart = strtotime($recording->recording_start);

Expand Down Expand Up @@ -1120,7 +1120,7 @@ public function get_user_recordings($userid, $from, $to) {
$recordinginfo->meetinguuid = $meeting->uuid;
$recordinginfo->url = $url;
$recordinginfo->filetype = $recording->file_type;
$recordinginfo->recordingtype = $recording->recording_type;
$recordinginfo->recordingtype = $recording->recording_type ?? 'null';
$recordinginfo->recordingstart = strtotime($recording->recording_start);

$recordings[$recording->id] = $recordinginfo;
Expand Down

0 comments on commit 03c7c3b

Please sign in to comment.