From 03d941ed42d442fdd6b395ef29925957d02ba88d Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Wed, 6 May 2015 17:45:48 -0700 Subject: [PATCH] Only configure the transaction profiler if profiling is enabled Follows I0fe14bcda. Change-Id: I4eb77d3b5ead587da6f01dec00fa6c5852225fcc --- maintenance/Maintenance.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 50b8a01275..3f804a0260 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -606,7 +606,11 @@ abstract class Maintenance { global $wgProfiler, $wgTrxProfilerLimits; $output = $this->getOption( 'profiler' ); - if ( $output && is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) { + if ( !$output ) { + return; + } + + if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) { $class = $wgProfiler['class']; $profiler = new $class( array( 'sampling' => 1, 'output' => $output ) + $wgProfiler -- 2.20.1