summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle Sebreghts2012-06-11 12:00:13 (GMT)
committerJelle Sebreghts2012-06-11 12:00:13 (GMT)
commitfa269b65ab2fc49662b621d4b6e5aad06ada48e4 (patch)
treea92061e6abe30450de269fd3364da4c32f8e51d1
parent8895c5f220476eedf5101c0a9f2b10ee10813419 (diff)
Issue #1599426 by sah62: Fixed Division by Zero in multifile.inc.7.x-1.2
-rw-r--r--multifile.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/multifile.inc b/multifile.inc
index 3ae1e30..4e7e883 100644
--- a/multifile.inc
+++ b/multifile.inc
@@ -675,8 +675,8 @@ function _webform_analysis_multifile($component, $sids = array()) {
$rows[0] = array(t('Left Blank'), ($submissions - $nonblanks));
$rows[1] = array(t('User uploaded file'), $nonblanks);
- $rows[2] = array(t('Average uploaded files'), $numfiles / $nonblanks);
- $rows[3] = array(t('Average uploaded file size'), ($sizetotal != 0 ? (int) (($sizetotal/$numfiles)/1024) . ' KB' : '0'));
+ $rows[2] = array(t('Average uploaded files'), ($nonblanks == 0) ? 0 : $numfiles / $nonblanks);
+ $rows[3] = array(t('Average uploaded file size'), (($sizetotal != 0 && $numfiles != 0) ? (int) (($sizetotal/$numfiles)/1024) . ' KB' : '0'));
return $rows;
}