From fc61acce12c0c4564d01d9b3021655ae42980525 Mon Sep 17 00:00:00 2001 From: andyjdavis Date: Thu, 23 Dec 2010 10:07:08 +0800 Subject: [PATCH] gradebook MDL-25713 now closing the recordset even when theres a problem --- lib/grade/grade_object.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/grade/grade_object.php b/lib/grade/grade_object.php index 2978ccde3a6b5..56e061592e67a 100644 --- a/lib/grade/grade_object.php +++ b/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();