r92119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92118‎ | r92119 | r92120 >
Date:22:59, 13 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Avoid notice on profile close errors
Modified paths:
  • /trunk/phase3/includes/profiler/ProfilerSimpleText.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/profiler/ProfilerSimpleText.php
@@ -28,7 +28,9 @@
2929 public function logData() {
3030 if ( $this->mTemplated ) {
3131 $this->close();
32 - $totalReal = $this->mCollated['-total']['real'];
 32+ $totalReal = isset( $this->mCollated['-total'] )
 33+ ? $this->mCollated['-total']['real']
 34+ : 0; // profiling mismatch error?
3335 uasort( $this->mCollated, array('self','sort') );
3436 array_walk( $this->mCollated, array('self','format'), $totalReal );
3537 if ( $this->visible ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91441Added percentages to ProfilerSimpleTextaaron06:39, 5 July 2011

Status & tagging log