Skip to content
Browse files

gradebook MDL-25713 now closing the recordset even when theres a problem

  • Loading branch information...
1 parent 2f9ea7d commit fc61acce12c0c4564d01d9b3021655ae42980525 @andyjdavis andyjdavis committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/grade/grade_object.php
View
3 lib/grade/grade_object.php
@@ -187,7 +187,8 @@ public static function fetch_all_helper($table, $classname, $params) {
$rs = $DB->get_recordset_select($table, $wheresql, $newparams);
//returning false rather than empty array if nothing found
if (!$rs->valid()) {
- return false;
+ $rs->close();
+ return false;
}
$result = array();

0 comments on commit fc61acc

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