Permalink
Browse files

Appropriately shutdown before aborting to avoid "PHP Notice: Uncommit…

…ted DB writes (transaction from ...", refs #3095

[skip ci]
  • Loading branch information...
mwjames committed Jan 12, 2019
1 parent ea6e060 commit a5a4a0d1b05eb622749fe59a1d2be4be699aaed4
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/GlobalFunctions.php
@@ -99,6 +99,12 @@ function smwfAbort( $text ) {
$html .= "<title>Error</title></head><body><h2>Error</h2><hr style='border: 0; height: 0; border-top: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.3);'>";
$html .= "<p>{$text}</p></body></html>";
// MW 1.26
// Manages deferred updates, job insertion, final commit, and the logging of
// profiling data
$mediaWiki = new \MediaWiki();
$mediaWiki->doPostOutputShutdown( 'fast' );
die( $html );
}

1 comment on commit a5a4a0d

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented on a5a4a0d Jan 18, 2019

Back-ported with bea16a5

Please sign in to comment.