From: Aaron Schulz Date: Mon, 12 Jan 2015 20:05:17 +0000 (-0800) Subject: Avoid fatal error with profiler in Maintenance.php X-Git-Tag: 1.31.0-rc.0~12662 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=acb4b730736250c2c2a2de2645174089315d1145;p=lhc%2Fweb%2Fwiklou.git 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 --- 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