WebRequest::getHeader: add optional flag to get back list
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index 50b8a01..3f804a0 100644 (file)
@@ -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