From 233f8eb171fc5f4a8b8d42f624287e75197a38f7 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 28 Apr 2024 20:53:05 -0500 Subject: [PATCH] More DB connection cleanup --- lib/DbConnection.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/DbConnection.php b/lib/DbConnection.php index f115334f..e6c9ae71 100644 --- a/lib/DbConnection.php +++ b/lib/DbConnection.php @@ -62,15 +62,13 @@ class DbConnection{ return []; } - $this->QueryCount++; $result = []; - $preparedSql = $sql; try{ - $handle = $this->_link->prepare($preparedSql); + $handle = $this->_link->prepare($sql); } catch(\PDOException $ex){ - throw $this->CreateDetailedException($ex, $preparedSql, $params); + throw $this->CreateDetailedException($ex, $sql, $params); } $name = 0; @@ -121,11 +119,13 @@ class DbConnection{ } else{ $done = true; - throw $this->CreateDetailedException($ex, $preparedSql, $params); + throw $this->CreateDetailedException($ex, $sql, $params); } } } + $this->QueryCount++; + return $result; }