Disabling profiling in the debug toolbar for ProfilerSimple (for now)
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 5 Apr 2014 18:09:16 +0000 (20:09 +0200)
committerAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 5 Apr 2014 18:12:32 +0000 (20:12 +0200)
Throws a fatal error when using a ProfilerSimple subclass and the
debug toolbar (the problem is that $this->mCollated doesn't have
the same format in both cases):

Warning:  Invalid argument supplied for foreach() in includes/profiler/Profiler.php on line 625

Fatal error:  Unsupported operand types in includes/profiler/Profiler.php on line 633

Change-Id: I7f2bc714396a9249193a5828c154e09f7e0b5230

includes/profiler/ProfilerSimple.php

index 6331a30..36f4bd4 100644 (file)
@@ -123,6 +123,12 @@ class ProfilerSimple extends Profiler {
                }
        }
 
+       public function getRawData() {
+               // Calling the method of the parent class results in fatal error.
+               // @todo Implement this correctly.
+               return array();
+       }
+
        public function getFunctionReport() {
                /* Implement in output subclasses */
                return '';