1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-07-31 02:10:37 +02:00

Fix Number.php: Undefined offset

This commit is contained in:
Sergey Romanenko
2013-08-24 12:47:33 +03:00
parent cc070065a9
commit 8f930f8c6d

View File

@@ -44,7 +44,7 @@ class Number
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[$i];
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
}
/**