I just have extended the method "public function rollBack()".
This check avoids the user from trying to rollback an transaction without a transaction-start.
...
..
/**
* @return bool|void
* @throws PDOException
*/
public function rollBack()
{
if ($this->transLevel == 0) {
throw new PDOException(
'trying to rollback without a transaction-start'
);
}
$this->transLevel--;
if ($this->transLevel == 0 || !$this->nestable()) {
parent::rollBack();
} else {
$this->exec("ROLLBACK TO SAVEPOINT LEVEL{$this->transLevel}");
}
}
...
..

Help











