From acb4b730736250c2c2a2de2645174089315d1145 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 12 Jan 2015 12:05:17 -0800 Subject: [PATCH] Avoid fatal error with profiler in Maintenance.php Error Message: "Fatal error: Class name must be a valid object or a string" Change-Id: Ia21f4d2c45aaaa12a270dd0fda7274008736a899 --- maintenance/Maintenance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 4b07d2ff05..9b98b206a8 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -604,7 +604,7 @@ abstract class Maintenance { global $wgProfiler; $output = $this->getOption( 'profiler' ); - if ( $output && is_array( $wgProfiler ) ) { + if ( $output && is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) { $class = $wgProfiler['class']; $profiler = new $class( array( 'sampling' => 1, 'output' => $output ) + $wgProfiler -- 2.20.1