Unit tests run in CLI mode without DBO_TRX
Change-Id: Icee9cf84cb9e057b329dd3960fcc9b238af478a3
]
);
- $dbw->onTransactionResolution( function () use ( &$scopeLock ) {
- ScopedCallback::consume( $scopeLock ); // release after commit
- } );
+ if ( $dbw->trxLevel() ) {
+ $dbw->onTransactionResolution( function () use ( &$scopeLock ) {
+ ScopedCallback::consume( $scopeLock ); // release after commit
+ } );
+ }
}
} catch ( Exception $e ) {
wfDebugLog( 'resourceloader', __METHOD__ . ": failed to update DB: $e" );