From: Frank Karlitschek Date: Fri, 1 Jun 2012 14:48:42 +0000 (+0200) Subject: prevend a division by zero problem X-Git-Tag: v4.5.0beta1~74^2~425^2~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e6b0eb3423ff0346fce64aadc1b33d481be7761f;p=nextcloud-server.git prevend a division by zero problem --- 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','');