Skip to content
Browse files

MDL-26117 skip invalid resource records during upgrade

  • Loading branch information...
1 parent 8cdc85a commit ae36bc3dd8c605f7b467a7b1378eafe8d23ca372 @skodak skodak committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/resource/db/upgradelib.php
View
6 mod/resource/db/upgradelib.php
@@ -53,7 +53,11 @@ function resource_20_migrate() {
$siteid = get_site()->id;
$fs = get_file_storage();
- if (strpos($path, 'LOCALPATH') === 0) {
+ if (empty($candidate->cmid)) {
+ // skip borked records
+ continue;
+
+ } else if (strpos($path, 'LOCALPATH') === 0) {
// ignore not maintained local files - sorry
continue;

0 comments on commit ae36bc3

Please sign in to comment.
Something went wrong with that request. Please try again.