From: Aaron Schulz Date: Wed, 13 Jul 2011 22:59:55 +0000 (+0000) Subject: Avoid notice on profile close errors X-Git-Tag: 1.31.0-rc.0~28856 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=3beb08fa87a653c12bfa20e82fc77c2ee0160e67;p=lhc%2Fweb%2Fwiklou.git Avoid notice on profile close errors --- diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index f54b0e50f0..ef9049faba 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -28,7 +28,9 @@ class ProfilerSimpleText extends ProfilerSimple { public function logData() { if ( $this->mTemplated ) { $this->close(); - $totalReal = $this->mCollated['-total']['real']; + $totalReal = isset( $this->mCollated['-total'] ) + ? $this->mCollated['-total']['real'] + : 0; // profiling mismatch error? uasort( $this->mCollated, array('self','sort') ); array_walk( $this->mCollated, array('self','format'), $totalReal ); if ( $this->visible ) {