Merge "Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks"
[lhc/web/wiklou.git] / includes / deferred / DeferredUpdates.php
index 29bb8d7..082d435 100644 (file)
@@ -65,7 +65,7 @@ class DeferredUpdates {
                        $lb = wfGetLB();
                        $dbw = $lb->getAnyOpenConnection( $lb->getWriterIndex() );
                        // Do the update as soon as there is no transaction
-                       if ( $dbw->trxLevel() ) {
+                       if ( $dbw && $dbw->trxLevel() ) {
                                $waitingOnTrx = true;
                                $dbw->onTransactionIdle( function() use ( &$waitingOnTrx ) {
                                        DeferredUpdates::doUpdates();