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; }