Got rid of some notices
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 17 Jan 2004 11:31:48 +0000 (11:31 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 17 Jan 2004 11:31:48 +0000 (11:31 +0000)
includes/Profiling.php

index 1bdf3fb..6d97f97 100755 (executable)
@@ -108,6 +108,12 @@ class Profiler
                        $end = explode( " ", $entry[3]);
                        $end = (float)$end[0] + (float)$end[1];
                        $elapsed = $end - $start;
+                       
+                       if ( !array_key_exists( $fname, $this->mCollated ) ) {
+                               $this->mCollated[$fname] = 0;
+                               $this->mCalls[$fname] = 0;
+                       }
+
                        $this->mCollated[$fname] += $elapsed;
                        $this->mCalls[$fname] ++;
                }