From: Alexandre Emsenhuber Date: Wed, 29 Jul 2009 14:38:28 +0000 (+0000) Subject: Avoid infinite loop when an exception occurs in command line mode X-Git-Tag: 1.31.0-rc.0~40649 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=0c4280dc38c044a554db6d551a7431e2dd15e5b9;p=lhc%2Fweb%2Fwiklou.git Avoid infinite loop when an exception occurs in command line mode --- diff --git a/includes/Profiler.php b/includes/Profiler.php index 80a6a68a55..4046a58683 100644 --- a/includes/Profiler.php +++ b/includes/Profiler.php @@ -128,6 +128,12 @@ class Profiler { * called by wfProfileClose() */ function close() { + global $wgProfiling; + + # Avoid infinite loop + if( !$wgProfiling ) + return; + while( count( $this->mWorkStack ) ){ $this->profileOut( 'close' ); }