From a2a07ceccf8eed162e6326210a2ba7719dcae1a8 Mon Sep 17 00:00:00 2001 From: Guillermo Pages Date: Mon, 13 Sep 2021 18:30:28 +0200 Subject: [PATCH] fix: [FreeTDS][SQL Server]Invalid cursor state --- src/Db/Connection.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Db/Connection.php b/src/Db/Connection.php index e654014..c04171f 100644 --- a/src/Db/Connection.php +++ b/src/Db/Connection.php @@ -29,19 +29,15 @@ class Connection $success = $statement->execute(!empty($values) ? $values : null); if (!$success) { - $statement->closeCursor(); throw new SqlException('SQL There was an error executing the request'); } $rows = $statement->fetchAll($fetchMode); if (!is_array($rows)) { - $statement->closeCursor(); throw new SqlException('PDO Unable to retrieve the result'); } - $statement->closeCursor(); - return new OdbcResultSet($rows); }