From 3beb08fa87a653c12bfa20e82fc77c2ee0160e67 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 13 Jul 2011 22:59:55 +0000 Subject: [PATCH] Avoid notice on profile close errors --- includes/profiler/ProfilerSimpleText.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ) { -- 2.20.1