isExpensive get default value
[lhc/web/wiklou.git] / includes / Profiling.php
index 2a108a8..ed58bf0 100755 (executable)
@@ -82,6 +82,7 @@ class Profiler
                if( !count( $this->mStack ) ) {
                        return "No profiling output\n";
                }
+               $this->close();
                $width = 125;
                $format = "%-" . ($width - 28) . "s %6d %6.3f %6.3f %6.3f%%\n";
                $titleFormat = "%-" . ($width - 28) . "s %9s %9s %9s %9s\n";
@@ -118,7 +119,7 @@ class Profiler
                        $this->mCalls[$fname] ++;
                }
 
-               $total = $this->mCollated["-total"];
+               $total = @$this->mCollated["-total"];
                $overhead = $this->mCollated["-overhead-internal"] / $profileCount;
                $this->mCalls["-overhead-total"] = $profileCount;
 
@@ -173,5 +174,4 @@ class Profiler
 
 $wgProfiler = new Profiler();
 $wgProfiler->profileIn( "-total" );
-
 ?>