X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fdeferred%2FMWCallableUpdate.php;h=9803b7a491b10312e5268aedb58b14038974d583;hb=a7e2b91b2c72f3522a7a9c3c957a43309e70b92e;hp=5247e97cf10682fcbb9fdaca787a750bb633d9de;hpb=1dd2e07276e1deaf431ddb01c92111038f9e2cd6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/MWCallableUpdate.php b/includes/deferred/MWCallableUpdate.php index 5247e97cf1..9803b7a491 100644 --- a/includes/deferred/MWCallableUpdate.php +++ b/includes/deferred/MWCallableUpdate.php @@ -1,5 +1,7 @@ callback = $callback; $this->fname = $fname; - if ( $dbw && $dbw->trxLevel() ) { - $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname ); + $dbws = is_array( $dbws ) ? $dbws : [ $dbws ]; + foreach ( $dbws as $dbw ) { + if ( $dbw && $dbw->trxLevel() ) { + $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname ); + } } }