summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-05 21:52:43 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-05 21:52:43 +0100
commit03e9a7abbf2851f3f8ac4c9a1d0bc072f4a9e103 (patch)
tree0a25d5bccc246048fb026f3bb61d039ec830eacd
parentd3726c7c0e497def97efcf610fdcac9bbebb0f3e (diff)
service/files::history: Fix total_size if no results
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/service/files.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/service/files.php b/application/service/files.php
index 962939c87..59a096d1b 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -27,7 +27,7 @@ class files {
}
$total_size = $CI->db->query("
- SELECT sum(filesize) sum
+ SELECT coalesce(sum(filesize), 0) sum
FROM (
SELECT DISTINCT hash, filesize
FROM `".$CI->db->dbprefix."files`