X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=blobdiff_plain;f=includes%2Fdeferred%2FMWCallableUpdate.php;h=9803b7a491b10312e5268aedb58b14038974d583;hb=e46d0694ac253df5f91fcfcd65ff19b0b3a2982c;hp=5247e97cf10682fcbb9fdaca787a750bb633d9de;hpb=9de4779e206628d8c7c9ae76785bfe825b5267d5;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 ); + } } }