Skip to content

Commit

Permalink
Merge branch 'wip-MDL-56635-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
andrewnicols committed Apr 4, 2018
2 parents 0e25774 + 6bc6757 commit 6ab10c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/classes/task/tag_cron_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function cleanup() {
$sql = "SELECT DISTINCT component, itemtype
FROM {tag_instance}
WHERE itemtype <> 'user' or component <> 'core'";
$tagareas = $DB->get_records_sql($sql);
$tagareas = $DB->get_recordset_sql($sql);
foreach ($tagareas as $tagarea) {
$sql = 'SELECT ti.id
FROM {tag_instance} ti
Expand All @@ -196,6 +196,7 @@ public function cleanup() {
$tagarray[] = $tagid->id;
}
}
$tagareas->close();

// Get instances for each of the ids to be deleted.
if (count($tagarray) > 0) {
Expand Down

0 comments on commit 6ab10c3

Please sign in to comment.