Profiler can be constructed without param
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 31 May 2011 17:18:15 +0000 (17:18 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 31 May 2011 17:18:15 +0000 (17:18 +0000)
Before that patch, we could see warnings such as:
  Missing argument 1 for Profiler::__construct(),

includes/profiler/Profiler.php

index c9ac4eb..1358828 100644 (file)
@@ -42,7 +42,7 @@ class Profiler {
        protected $mProfileID = false;
        private static $__instance = null;
 
-       function __construct( $params ) {
+       function __construct( $params = null ) {
                // Push an entry for the pre-profile setup time onto the stack
                global $wgRequestTime;
                if ( !empty( $wgRequestTime ) ) {