X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FDeferredUpdates.php;h=716e65c8c39421acc563dec374ed2a78156443c2;hb=e8b571fbf1a41ac2a2000b2a515393494d93a806;hp=262994e380c23303ac593409ba76386d037869e4;hpb=d109eae77f904501e2b0d25b2713feab7313b1ad;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 262994e380..716e65c8c3 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -1,4 +1,25 @@ doUpdate(); + try { + $update->doUpdate(); - if ( $doCommit && $dbw->trxLevel() ) { - $dbw->commit( __METHOD__ ); + if ( $doCommit && $dbw->trxLevel() ) { + $dbw->commit( __METHOD__, 'flush' ); + } + } catch ( MWException $e ) { + // We don't want exceptions thrown during deferred updates to + // be reported to the user since the output is already sent. + // Instead we just log them. + if ( !$e instanceof ErrorPageError ) { + wfDebugLog( 'exception', $e->getLogMessage() ); + } } }