From 02d57eeeb41da2bdf5ca28d419815997a4df67ea Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Wed, 1 Nov 2017 18:31:47 +0000 Subject: small fixes --- src/db.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/db.php') 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; } -- cgit v1.2.3