Skip to content

Commit

Permalink
fix closing statement cursor on pdo_sqlsrv if not executed yet
Browse files Browse the repository at this point in the history
  • Loading branch information
deeky666 committed Feb 9, 2017
1 parent f5dcc4c commit 2bb4c37
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/Doctrine/DBAL/Driver/PDOStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ public function bindParam($column, &$variable, $type = \PDO::PARAM_STR, $length
}
}

/**
* {@inheritdoc}
*/
public function closeCursor()
{
try {
return parent::closeCursor();
} catch (\PDOException $exception) {
// Exceptions not allowed by the interface.
// In case driver implementations do not adhere to the interface, silence exceptions here.
return true;
}
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 2bb4c37

Please sign in to comment.