Skip to content

Commit

Permalink
Add null check in data dump
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-tii committed Aug 6, 2024
1 parent 8b8f159 commit 59d2b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion settings_extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
$datarow = get_object_vars($datarow);
$output .= "|";
foreach ($datarow as $datacell) {
$output .= ' '.htmlspecialchars(str_pad(substr($datacell, 0, $columnwidth), $columnwidth, " ", 1)).'|';
$output .= ' '.htmlspecialchars(str_pad(substr($datacell ?? '', 0, $columnwidth), $columnwidth, " ", 1)).'|';
}
if ($table == 'turnitintooltwo_users' && $moodleusers[$datarow['userid']]) {
$firstname = format_string($moodleusers[$datarow['userid']]->firstname);
Expand Down

0 comments on commit 59d2b7a

Please sign in to comment.