Skip to content

Commit d994b6b

Browse files
committed
- added MySQL::transaction($callback)
1 parent 186c4b3 commit d994b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Databases/MySQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function transactionRollback() {
201201
public function transaction($callback) {
202202
try {
203203
$this->pdo->beginTransaction();
204-
call_user_func($callback);
204+
call_user_func($callback, $this);
205205
$this->pdo->commit();
206206
} catch (\Exception $e) {
207207
$this->pdo->rollBack();

0 commit comments

Comments
 (0)