Skip to content

Commit

Permalink
Merge pull request #29 from catalyst/small-fixes
Browse files Browse the repository at this point in the history
Small fixes to help with prior backup restores
  • Loading branch information
Peterburnett authored Sep 28, 2021
2 parents 5842a99 + f32e619 commit f14204d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions block_carousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public function get_content() {

$numslides = count($order);
foreach ($data as $slideid => $data) {
if (empty($data)) {
continue;
}
$data = (object) $data;
if ($data->disabled) {
continue;
Expand Down
7 changes: 6 additions & 1 deletion classes/cache/slide_cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ public function load_for_cache($key) {
$data['text'] = $data['notext'] ? '' : $data['text'];

// Find the relevant content for the slide.
$context = \context_block::instance($record->blockid);
try {
$context = \context_block::instance($record->blockid);
} catch (\dml_missing_record_exception $e) {
return [];
}

$selectedfile = null;
$storage = get_file_storage();

Expand Down

0 comments on commit f14204d

Please sign in to comment.