]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cast to number instead of integer in OC\Files\Cache\HomeCache
authorAndreas Fischer <bantu@owncloud.com>
Sun, 16 Feb 2014 00:03:39 +0000 (01:03 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Thu, 29 May 2014 14:26:02 +0000 (16:26 +0200)
lib/private/files/cache/homecache.php

index 2326c46e8d0213cbb7eca13172006c080746435a..f61769f0b9bff0ba7b1965db3ee87a317a048282 100644 (file)
@@ -36,8 +36,10 @@ class HomeCache extends Cache {
                        $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
                        if ($row = $result->fetchRow()) {
                                list($sum, $unencryptedSum) = array_values($row);
-                               $totalSize = (int)$sum;
-                               $unencryptedSize = (int)$unencryptedSum;
+                               $totalSize = 0 + $sum;
+                               $unencryptedSize = 0 + $unencryptedSum;
+                               $entry['size'] += 0;
+                               $entry['unencrypted_size'] += 0;
                                if ($entry['size'] !== $totalSize) {
                                        $this->update($id, array('size' => $totalSize));
                                }