mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
Fixed division by zero warning.
This commit is contained in:
parent
1d86ea8851
commit
a0664d54d1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user