Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onError, onSuccess in transaction #22

Closed
asmdk opened this issue Jan 28, 2016 · 1 comment
Closed

onError, onSuccess in transaction #22

asmdk opened this issue Jan 28, 2016 · 1 comment

Comments

@asmdk
Copy link

asmdk commented Jan 28, 2016

php 5.6.12

im use transaction with callback:

->onError(function(PDOException $e, $transaction){ //code write log throw new \PDOException($e->getMessage()); }) ->onSuccess(function($transaction){ //code write log })

both methods i have fatal error, for example:
Fatal error: Call to undefined method Opis\Database\Transaction::successCallback()

that will be corrected in \opis\database\lib\Transaction.php, method execute, we should replace
if ($this->successCallback !== null) { $this->successCallback($this); }
on
if ($this->successCallback !== null) { call_user_func($this->successCallback, $this); }
got error callback the same...

@msarca
Copy link
Member

msarca commented Jan 28, 2016

Fixed in v3.2.2. Thanks for reporting.

@msarca msarca closed this as completed Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants