Index: trunk/phase3/includes/Profiler.php |
— | — | @@ -284,9 +284,9 @@ |
285 | 285 | $overheadInternal[] = $elapsed; |
286 | 286 | } |
287 | 287 | } |
288 | | - $overheadTotal = array_sum( $overheadTotal ) / count( $overheadInternal ); |
289 | | - $overheadMemory = array_sum( $overheadMemory ) / count( $overheadInternal ); |
290 | | - $overheadInternal = array_sum( $overheadInternal ) / count( $overheadInternal ); |
| 288 | + $overheadTotal = $overheadTotal ? array_sum( $overheadTotal ) / count( $overheadInternal ) : 0; |
| 289 | + $overheadMemory = $overheadMemory ? array_sum( $overheadMemory ) / count( $overheadInternal ) : 0; |
| 290 | + $overheadInternal = $overheadInternal ? array_sum( $overheadInternal ) / count( $overheadInternal ) : 0; |
291 | 291 | |
292 | 292 | # Collate |
293 | 293 | foreach( $this->mStack as $index => $entry ){ |