Log a backtrace from the culprit location if headers were already sent
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 5343248..7a34c74 100644 (file)
@@ -28,6 +28,7 @@ use Liuggio\StatsdClient\Sender\SocketSender;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\Session\SessionManager;
 use Wikimedia\ScopedCallback;
+use Wikimedia\Rdbms\LBFactory;
 
 // Hide compatibility functions from Doxygen
 /// @cond
@@ -1787,6 +1788,7 @@ function wfHttpError( $code, $label, $desc ) {
                $wgOut->sendCacheControl();
        }
 
+       MediaWiki\HeaderCallback::warnIfHeadersSent();
        header( 'Content-type: text/html; charset=utf-8' );
        print '<!DOCTYPE html>' .
                '<html><head><title>' .