From 6fd8ea4b3fe454de145a695cc1c5c04d7e65686d Mon Sep 17 00:00:00 2001 From: John Du Hart Date: Tue, 21 Feb 2012 16:48:46 +0000 Subject: [PATCH] Followup r105123, fix for MWDebug logging SQL queries on command line mode --- includes/Setup.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index c704d293ca..b858dbae5d 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -361,7 +361,10 @@ if ( $wgCookieSecure === 'detect' ) { $wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' ); } -if ( $wgDebugToolbar ) { +// Disable MWDebug for command line mode, this prevents MWDebug from eating up +// all the memory from logging SQL queries on maintenance scripts +global $wgCommandLineMode; +if ( $wgDebugToolbar && !$wgCommandLineMode ) { MWDebug::init(); } @@ -410,7 +413,6 @@ if( is_null( $wgLocalTZoffset ) ) { } # Useful debug output -global $wgCommandLineMode; if ( $wgCommandLineMode ) { $wgRequest = new FauxRequest( array() ); -- 2.20.1