aboutsummaryrefslogtreecommitdiff
path: root/src/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.php')
-rw-r--r--src/db.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/db.php b/src/db.php
index 5948186..c43816f 100644
--- a/src/db.php
+++ b/src/db.php
@@ -245,9 +245,10 @@ function DBGetRow ($sql,$i,$c=null,$txt='') {
if (DBnlines($r) < $i+1) return null;
$a = DBRow ($r, $i);
if (!$a) {
- LOGError("Unable to get row $i from a query ($txt). SQL=(" . $sql . ")");
- MSGError("Unable to get row from query ($txt).");
- exit;
+ DBClose($c);
+ LOGError("Unable to get row $i from a query ($txt). SQL=(" . $sql . ")");
+ MSGError("Unable to get row from query ($txt).");
+ exit;
}
return $a;
}