From: Tim Starling Date: Tue, 31 May 2011 23:50:11 +0000 (+0000) Subject: Fix for r89206, r89218: always supply constructor parameters X-Git-Tag: 1.31.0-rc.0~29818 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=173f4fe0b9fea0f211e69c3568e857d57763e23b;p=lhc%2Fweb%2Fwiklou.git Fix for r89206, r89218: always supply constructor parameters --- diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 13588285f4..78ea912964 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -42,7 +42,7 @@ class Profiler { protected $mProfileID = false; private static $__instance = null; - function __construct( $params = null ) { + function __construct( $params ) { // Push an entry for the pre-profile setup time onto the stack global $wgRequestTime; if ( !empty( $wgRequestTime ) ) { @@ -69,7 +69,7 @@ class Profiler { } elseif( $wgProfiler instanceof Profiler ) { self::$__instance = $wgProfiler; // back-compat } else { - self::$__instance = new ProfilerStub; + self::$__instance = new ProfilerStub( $wgProfiler ); } } return self::$__instance; diff --git a/includes/profiler/ProfilerSimple.php b/includes/profiler/ProfilerSimple.php index 8f1c621519..2bfc5e02d4 100644 --- a/includes/profiler/ProfilerSimple.php +++ b/includes/profiler/ProfilerSimple.php @@ -12,8 +12,9 @@ class ProfilerSimple extends Profiler { var $mMinimumTime = 0; - function __construct() { + function __construct( $params ) { global $wgRequestTime, $wgRUstart; + parent::__construct( $params ); if (!empty($wgRequestTime) && !empty($wgRUstart)) { $this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart)); diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index fccfb92748..49ad02bc4e 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -22,7 +22,7 @@ class ProfilerSimpleText extends ProfilerSimple { if( isset( $profileConfig['visible'] ) && $profileConfig['visible'] ) { $this->visible = true; } - parent::__construct(); + parent::__construct( $profileConfig ); } public function logData() { diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php index 1e0d20456f..ba41babcab 100644 --- a/includes/profiler/ProfilerSimpleTrace.php +++ b/includes/profiler/ProfilerSimpleTrace.php @@ -14,8 +14,9 @@ class ProfilerSimpleTrace extends ProfilerSimple { var $trace = ""; var $memory = 0; - function __construct() { + function __construct( $params ) { global $wgRequestTime, $wgRUstart; + parent::__construct( $params ); if ( !empty( $wgRequestTime ) && !empty( $wgRUstart ) ) { $this->mWorkStack[] = array( '-total', 0, $wgRequestTime, $this->getCpuTime( $wgRUstart ) ); }