MDL-62383 privacy: Close recordset in contextlist::add_from_sql()
authorJun Pataleta <jun@moodle.com>
Thu, 10 May 2018 01:55:33 +0000 (09:55 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 10 May 2018 01:55:33 +0000 (09:55 +0800)
privacy/classes/local/request/contextlist.php

index 7e6461c..c5b9cb1 100644 (file)
@@ -55,6 +55,7 @@ class contextlist extends contextlist_base {
             $contextids[] = $context->ctxid;
             \context_helper::preload_from_record($context);
         }
+        $contexts->close();
 
         $this->set_contextids(array_merge($this->get_contextids(), $contextids));