Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-25708 recordsets - url module

  • Loading branch information...
commit cfd62f13a1f85b53d73004c5982a3f8e1910ec27 1 parent a1d870a
@stronk7 stronk7 authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/url/db/upgradelib.php
View
6 mod/url/db/upgradelib.php
@@ -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;
}
@@ -135,4 +137,4 @@ function url_20_migrate() {
// clear all course modinfo caches
rebuild_course_cache(0, true);
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.