prevend a division by zero problem
This commit is contained in:
parent
1395e411f4
commit
e6b0eb3423
|
@ -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','');
|
||||
|
|
Loading…
Reference in New Issue