From: Ori Livneh Date: Thu, 7 May 2015 00:45:48 +0000 (-0700) Subject: Only configure the transaction profiler if profiling is enabled X-Git-Tag: 1.31.0-rc.0~11463^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=03d941ed42d442fdd6b395ef29925957d02ba88d;p=lhc%2Fweb%2Fwiklou.git Only configure the transaction profiler if profiling is enabled Follows I0fe14bcda. Change-Id: I4eb77d3b5ead587da6f01dec00fa6c5852225fcc --- 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