Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2012-08-16 05:49:11 +0400
committermattpiwik <matthieu.aubry@gmail.com>2012-08-16 05:49:11 +0400
commit2ead85be01415f59795a886357a45391213c33fc (patch)
tree5be40ed4aa5aef82059a20bde908c818d5d17723
parentc6d0812a97347a2e41f5cd6176ffa4ae9a6ac1df (diff)
Fixing Warning: Division by zero in /home/domain/domains/analytics.domain.nl/public_html/plugins/DBStats/MySQLMetadataProvider.php on line 275
git-svn-id: http://dev.piwik.org/svn/trunk@6784 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rwxr-xr-xplugins/DBStats/MySQLMetadataProvider.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php
index efea4f2a7c..282817ebfd 100755
--- a/plugins/DBStats/MySQLMetadataProvider.php
+++ b/plugins/DBStats/MySQLMetadataProvider.php
@@ -272,6 +272,10 @@ class Piwik_DBStats_MySQLMetadataProvider
*/
public function getEstimatedRowsSize( $row_count, $status )
{
+ if($status['Rows'] == 0)
+ {
+ return 0;
+ }
$avgRowSize = ($status['Data_length'] + $status['Index_length']) / $status['Rows'];
return $avgRowSize * $row_count;
}