* Fixes "Undefined index: threshold" and
"Invalid argument supplied for foreach()" errors
so that output actually can show
Change-Id: Ibf8090f265d988c58d1752319336a5146a28f4d0
* Activate the profiler (assuming $wgProfiler is set)
*/
protected function activateProfiler() {
* Activate the profiler (assuming $wgProfiler is set)
*/
protected function activateProfiler() {
- global $wgProfiler, $wgTrxProfilerLimits;
+ global $wgProfiler, $wgProfileLimit, $wgTrxProfilerLimits;
$output = $this->getOption( 'profiler' );
if ( !$output ) {
$output = $this->getOption( 'profiler' );
if ( !$output ) {
if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
$class = $wgProfiler['class'];
$profiler = new $class(
if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
$class = $wgProfiler['class'];
$profiler = new $class(
- array( 'sampling' => 1, 'output' => $output ) + $wgProfiler
+ array( 'sampling' => 1, 'output' => array( $output ) )
+ + $wgProfiler
+ + array( 'threshold' => $wgProfileLimit )
);
$profiler->setTemplated( true );
Profiler::replaceStubInstance( $profiler );
);
$profiler->setTemplated( true );
Profiler::replaceStubInstance( $profiler );