From: Chad Horohoe Date: Mon, 19 Sep 2011 23:25:13 +0000 (+0000) Subject: Back-compat for $wgProfiler set as a class. Fix for r89206 X-Git-Tag: 1.31.0-rc.0~27542 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=70dc1f53fb5add46020ddb8ea84e6ec63a66001e;p=lhc%2Fweb%2Fwiklou.git Back-compat for $wgProfiler set as a class. Fix for r89206 --- diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 1fc7b0e639..bb6ab13025 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -13,7 +13,7 @@ */ function wfProfileIn( $functionname ) { global $wgProfiler; - if ( isset( $wgProfiler['class'] ) ) { + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { Profiler::instance()->profileIn( $functionname ); } } @@ -24,7 +24,7 @@ function wfProfileIn( $functionname ) { */ function wfProfileOut( $functionname = 'missing' ) { global $wgProfiler; - if ( isset( $wgProfiler['class'] ) ) { + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { Profiler::instance()->profileOut( $functionname ); } }