Skip to content

Commit

Permalink
MDL-25708 recordsets - url module
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 22, 2011
1 parent a1d870a commit cfd62f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mod/url/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function url_20_migrate() {
return;
}

if (!$candidates = $DB->get_recordset('resource_old', array('type'=>'file', 'migrated'=>0))) {
$candidates = $DB->get_recordset('resource_old', array('type'=>'file', 'migrated'=>0));
if (!$candidates->valid()) {
$candidates->close(); // Not going to iterate (but exit), close rs
return;
}

Expand Down Expand Up @@ -135,4 +137,4 @@ function url_20_migrate() {

// clear all course modinfo caches
rebuild_course_cache(0, true);
}
}

0 comments on commit cfd62f1

Please sign in to comment.