diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-06-01 16:48:42 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-06-01 16:48:42 +0200 |
commit | e6b0eb3423ff0346fce64aadc1b33d481be7761f (patch) | |
tree | cde1e22b5f3985d2fbf8ee0cad635da99e880100 | |
parent | 1395e411f464aa717c26c6e2be142e7ecaef8d50 (diff) | |
download | nextcloud-server-e6b0eb3423ff0346fce64aadc1b33d481be7761f.tar.gz nextcloud-server-e6b0eb3423ff0346fce64aadc1b33d481be7761f.zip |
prevend a division by zero problem
-rw-r--r-- | settings/personal.php | 1 |
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',''); |