summaryrefslogtreecommitdiffstats
path: root/settings/personal.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-06-01 16:48:42 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-06-01 16:48:42 +0200
commite6b0eb3423ff0346fce64aadc1b33d481be7761f (patch)
treecde1e22b5f3985d2fbf8ee0cad635da99e880100 /settings/personal.php
parent1395e411f464aa717c26c6e2be142e7ecaef8d50 (diff)
downloadnextcloud-server-e6b0eb3423ff0346fce64aadc1b33d481be7761f.tar.gz
nextcloud-server-e6b0eb3423ff0346fce64aadc1b33d481be7761f.zip
prevend a division by zero problem
Diffstat (limited to 'settings/personal.php')
-rw-r--r--settings/personal.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/settings/personal.php b/settings/personal.php
index 41499657ac7..64e08be89eb 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -20,6 +20,7 @@ $rootInfo=OC_FileCache::get('');
$used=$rootInfo['size'];
$free=OC_Filesystem::free_space();
$total=$free+$used;
+if($total==0) $total=1; // prevent division by zero
$relative=round(($used/$total)*10000)/100;
$email=OC_Preferences::getValue(OC_User::getUser(), 'settings','email','');