This commit is contained in:
lizandrogd
2026-01-13 00:11:44 -05:00
parent 6c95f0c277
commit 1abe5bba2d
8 changed files with 1811 additions and 73 deletions
+9 -1
View File
@@ -110,7 +110,15 @@ class Database {
}
public function rollback() {
return $this->pdo->rollback();
try {
return $this->pdo->rollback();
} catch (PDOException $e) {
// Si no hay transacción activa, simplemente ignorar
if ($e->getCode() !== 'HY000' || strpos($e->getMessage(), 'no active transaction') === false) {
throw $e;
}
return false;
}
}
public function execute($sql, $params = []) {