# HG changeset patch # User Dan # Date 1239839586 14400 # Node ID 05c341ea754576ac38b1a57a57b3617ad91c616b # Parent 91f4da84966f461dedffca3dc91a66b58fc661cc Fixed division by zero on first day installed. diff -r 91f4da84966f -r 05c341ea7545 plugins/admin/Home.php --- a/plugins/admin/Home.php Wed Apr 15 19:44:47 2009 -0400 +++ b/plugins/admin/Home.php Wed Apr 15 19:53:06 2009 -0400 @@ -209,6 +209,8 @@ $db->free_result(); $days_installed = round( (time() / 86400) - ($install_date / 86400) ); + if ( $days_installed < 1 ) + $days_installed = 1; // Comments $q = $db->sql_query('SELECT COUNT(*) FROM ' . table_prefix . "comments");