Fixed precision loss in post disk space usage

This commit is contained in:
Marcin Kurczewski 2014-11-22 18:08:34 +01:00
parent cd688b25a3
commit f1647a5f7b

View file

@ -44,7 +44,7 @@ class PostDao extends AbstractDao implements ICrudDao
public function getTotalFileSize() public function getTotalFileSize()
{ {
$query = $this->pdo->from($this->tableName)->select('SUM(originalFileSize) AS __sum'); $query = $this->pdo->from($this->tableName)->select('SUM(originalFileSize) AS __sum');
return intval(iterator_to_array($query)[0]['__sum']); return iterator_to_array($query)[0]['__sum'];
} }
public function findByName($name) public function findByName($name)