Fixed division by zero warning.

This commit is contained in:
Ilia Alshanetsky 2004-01-16 15:17:37 +00:00
parent 1d86ea8851
commit a0664d54d1

View File

@ -1112,9 +1112,13 @@ function get_summary($show_ext_summary)
global $exts_skipped, $exts_tested, $n_total, $sum_results, $percent_results, $end_time, $start_time, $failed_test_summary, $PHP_FAILED_TESTS;
$x_total = $n_total - $sum_results['SKIPPED'] - $sum_results['BORKED'];
$x_warned = (100.0 * $sum_results['WARNED']) / $x_total;
$x_failed = (100.0 * $sum_results['FAILED']) / $x_total;
$x_passed = (100.0 * $sum_results['PASSED']) / $x_total;
if ($x_total) {
$x_warned = (100.0 * $sum_results['WARNED']) / $x_total;
$x_failed = (100.0 * $sum_results['FAILED']) / $x_total;
$x_passed = (100.0 * $sum_results['PASSED']) / $x_total;
} else {
$x_warned = $x_failed = $x_passed = 0;
}
$summary = "";
if ($show_ext_summary) {